What's the big deal w/ all these programming framework?

LuckyTaxi

Diamond Member
Dec 24, 2000
6,044
23
81
I just spent 30 mins trying to set up django. I had no issue installing it and getting it to "run" but I can't get a stupid "hello world" to work. You tell me I have to create template and then after that i gotta create a view? Jesus, in php I just go <?php echo "hello world" ?> and be done with it.

I'm up for learning new and upcoming technology, but wow, I just find it easier to do it all in php.
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
That's short-term thinking.

A good framework hands you thousands or tens of thousands of lines of pre-written and pre-tested code that you never need to write from scratch again once you learn to use it.

Do you start each new project with a blank text file and redo -everything- from scratch each time, or do you have libraries and code snippets that you reuse over and over?

Do you write your own code for every little thing or do you learn and use pre-written libraries for CGI processing, mail, encryption, etc.?

Reinventing the wheel for each new project is a waste of time and gets boring very fast. It's easier and even makes sense to start out that way when you're first learning a language (at least for your first language), but over time you should be moving towards taking existing parts and customizing only as necessary.
 

LuckyTaxi

Diamond Member
Dec 24, 2000
6,044
23
81
what i find myself doing lately is i pull code (functions) from old projects i have laying around. for example, i need to throw in some pagination, i took the function from a prior project and threw it inside my current project.
works fine, i just cant be bothered with creating views and all that stuff.
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
In other words, the framework you built yourself and know by heart is easeir to use than some other framework when you're starting from zero :)

That's true in the short term, but if the new framework does a lot of things that you haven't written code for, like a shopping cart, inventory maangement system, membership management, etc. you could come out ahead working through the learnng curve.

Once you buy into a popular framework you often get new features for free, like adding a couple of lines of code to turn on an email newsletter signup or add RSS feeds to your site.

It depends on what you're trying to do, how much work it involves, and how much the new framework has pre-written for it vs. how much your home-grown library of code would do for you.

Like almost everything else in development, the answer is "it depends." :)
 

LuckyTaxi

Diamond Member
Dec 24, 2000
6,044
23
81
dont get me wrong, i think it was more of me not wanting to learn something new and i was totally turned off when i started following the tutorial and the book had me modifying templates and then adding the template to a setting file and then calling this file from within my "python code" was just too much. then again, the same can be said for php, we use "include" to include libraries and then in the html file aka templates we throw in some php code. eh, maybe ill try again someday, it would be nice to say "i used django to create this website." it makes me feel special :D
 

esun

Platinum Member
Nov 12, 2001
2,214
0
0
Like anything new, it takes some time to get used to whatever framework you're working with. I just started coding a site with CakePHP (unfortunately I had trouble installing RoR and Django) and had to dig through their documentation to figure things out. I started out using CakePHP 1.2, but since the documentation was nonexistent for much of v1.2 (which is in beta, admittedly), I went back to v1.1 and haven't had too much trouble so far.

Although it may seem easier just to use plain old PHP at first, you'll realize that implementing user authentication, access control, and blog-like functionality yourself is a pain, while it can be made quite easy using a framework.
 

aceO07

Diamond Member
Nov 6, 2000
4,491
0
76
I don't think that framework was meant to be a quick way of displaying 'hello world' on the webpage.. ;)

I started doing RoR a few months back and it took about 80pages into the book before I could do anything that I thought was cool. Now I can have it say 'hello world', and for a couple more minutes I make it do other cool stuff.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
13
81
www.markbetz.net
Originally posted by: ApacheChief
I agree completely, all of the framework stuff I've dealt with seems absolutely useless.

Well, I deal with the .Net framework on a daily basis, and it's far from useless :). Frameworks can accelerate you way down the path to your development goals, but with most of them you have to drink the koolaid and align the project architecture and methods to the framework.
 

LuckyTaxi

Diamond Member
Dec 24, 2000
6,044
23
81
Originally posted by: aceO07
I don't think that framework was meant to be a quick way of displaying 'hello world' on the webpage.. ;)

I started doing RoR a few months back and it took about 80pages into the book before I could do anything that I thought was cool. Now I can have it say 'hello world', and for a couple more minutes I make it do other cool stuff.

HaHa! Yea, I couldnt get to to print hello world so no way I'm going to keep trying. I'm better off learning more about OOP than try to pick up a new language.
 

esun

Platinum Member
Nov 12, 2001
2,214
0
0
Originally posted by: ApacheChief
Oh, I mainly develop with .NET, I meant PHP frameworks :)

Although I completely disagree (for the aforementioned reasons), Django and RoR use Python and Ruby, respectively, so I'm not sure the relevance of your comment.
 

Descartes

Lifer
Oct 10, 1999
13,968
2
0
Originally posted by: Hyperblaze
I've build my own frameworks. Using an already built framework kills half the fun.

Perhaps, but for many the practice of software is a profession. Exercising what's the most fun doesn't always correspond to exercising what's the most cost efficient, easier to maintain, etc.

Generally, I find that entire application frameworks are too inflexible to meet most needs. Once you go beyond what the framework is capable and start on a path of extreme customization, much of the value of the framework is lost. CSLA is a well-known architecture, and it suffers this fate; granted, it has its place.

I much prefer frameworks like Microsoft's ESL. It's general enough to be applicable to almost anything, yet abstract enough so that you can use it as needed according to your architecture. Writing logging, exception handling, transaction handling, etc. from scratch is silly; however, most enterprise applications require some degree of creativity with respect to handling the actual business itself (e.g. how to model the domain).
 

Hyperblaze

Lifer
May 31, 2001
10,028
1
81
Originally posted by: Descartes
Originally posted by: Hyperblaze
I've build my own frameworks. Using an already built framework kills half the fun.

Perhaps, but for many the practice of software is a profession. Exercising what's the most fun doesn't always correspond to exercising what's the most cost efficient, easier to maintain, etc.

Generally, I find that entire application frameworks are too inflexible to meet most needs. Once you go beyond what the framework is capable and start on a path of extreme customization, much of the value of the framework is lost. CSLA is a well-known architecture, and it suffers this fate; granted, it has its place.

I much prefer frameworks like Microsoft's ESL. It's general enough to be applicable to almost anything, yet abstract enough so that you can use it as needed according to your architecture. Writing logging, exception handling, transaction handling, etc. from scratch is silly; however, most enterprise applications require some degree of creativity with respect to handling the actual business itself (e.g. how to model the domain).

I code for a living too. For the project I'm in at work we could of always of used an existing framework to build the application, however, the requirements were so specific, I doubt any framework out there would of match the specifics enough.

If you want something quick and easy, I guess an existing framework would work well, but I tend to do a lot of custom work.

I have fun when I'm faced with a challenge, which is great since at work I'm constantly faced with those.

I guess you and I code in different environments. Which is good because what you consider silly is something I don't mind doing at all.

Never tried a Microsoft framework, and since I hardly ever code in ASP, I doubt I ever will.

 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
13
81
www.markbetz.net
Originally posted by: esun
Originally posted by: ApacheChief
Oh, I mainly develop with .NET, I meant PHP frameworks :)

Although I completely disagree (for the aforementioned reasons), Django and RoR use Python and Ruby, respectively, so I'm not sure the relevance of your comment.

The relevance of his comment is he was responding to my comment.

Which naturally gives it borderline relevance at best.