Web Development

Your Opinion -- Framework or scratch? – CPUFreak91

CPUFreak91

Member

Posts: 2337
From:
Registered: 02-01-2005
I'm considering making a CMS for my website in Python and maybe Ruby to learn web programming but I have a few questions:
Should I go with a framework (I'm considering Pylons) or should I mke my own cgi libraries? If I don't use a full-fledged framework I'm considering Myghty as a templating framework.

If I were to let others download the source or even sell my CMS what tools would you recommend?

------------------
All Your Base Are Belong To Us!!! chown -r us ./base
"After three days without programming, life becomes meaningless.'' -- Tao of Programming Book 2

My Programming and Hacker/Geek related Blog

SSquared

Member

Posts: 654
From: Pacific Northwest
Registered: 03-22-2005
I am not a fan of recreating the wheel. If something is already available and it works, I highly recommend using it. Please don't flame me and take me too far/literally with this. I mean it within reason. Too often, I am found trying to fix bugs (or even leaving them...GASP!) because someone chose to write their own version of something. For example, I have worked with code where someone chose to write their own version of much of STL.

Try to look at things from a resume perspective. Will it be more beneficial to say you are familiar with Pylons? Or that you wrote your own framework? Are you willing to spend the time to write the framework and work out bugs? Or would you prefer focusing more on your CMS?

No doubt you can learn quite a lot by writing your own framework. You get to learn and understand concepts at a much more intimate level. But it can also be quite a lot of work. And, if you do plan to sell your CMS someday, that will just mean more work and maintenance for you as you need to also support the framework you wrote. As Pylons pushes the envelope with the next great feature, you too may need to consider adding that feature.

All sorts of stuff to consider. My recommendation is obviously to use an already well-established framework.

...on the other hand, you never know what will happen with the development of a framework. Will it stop? Will support become less?

Sorry, I always look at both sides of the equation. And this is why, ultimately, I try to leave things up to the reader. I don't know what is in the readers mind, their desires, etc., so writing your own framework could be just right for you and your situation.

Clear as mud?

D-SIPL

Moderator

Posts: 1345
From: Maesteg, Wales
Registered: 07-21-2001
I'm just finishing the very same thing. I wrote mine using Python-CGI from scratch, in hindsight i would have probably used either Zope or CherryPy. My current task is to write a web-based irc client using Python-CGI, i'll probably wrap it around the Twisted framework.

I would use on of the above libraries. The site i worked on was for a friend and will be going live very shortly i suspect. I'll give you a heads up when it finally does.

------------------
"One World. One Web. One Program." -Microsoft promotional advertisement
"Ein Volk, ein Reich, ein Fuhrer!" -Adolf Hitler
"I believe in freedom... not freedom like America, freedom like a shopping cart"

CPUFreak91

Member

Posts: 2337
From:
Registered: 02-01-2005
quote:
Originally posted by SSquared:
I am not a fan of recreating the wheel.


Neither am I.

quote:

If something is already available and it works, I highly recommend using it.


I wasn't sure if Pylons would work for what I want to do, but with some more fiddling I believe it can.

quote:

Try to look at things from a resume perspective. Will it be more beneficial to say you are familiar with Pylons?


Probably yes.

quote:

Or that you wrote your own framework?


Although that might be useful, I don't think it would be necessary.

quote:

Are you willing to spend the time to write the framework and work out bugs?


Yes.

quote:

Or would you prefer focusing more on your CMS?


Also yes.

quote:

No doubt you can learn quite a lot by writing your own framework. You get to learn and understand concepts at a much more intimate level.


Or I could modify an existing one. I modify other peoples code frequently to see how the inner workings work.

quote:

But it can also be quite a lot of work.


That's what I'm not to keen on. All that work is probably not necessary.

quote:

All sorts of stuff to consider. My recommendation is obviously to use an already well-established framework.


Ok. Thanks!

quote:

...on the other hand, you never know what will happen with the development of a framework. Will it stop? Will support become less?


Since it's open source, I can continue development on my own if need be.

quote:

Sorry, I always look at both sides of the equation.


No, it's good. I respect that and try to do the same.

quote:

I don't know what is in the readers mind, their desires, etc., so writing your own framework could be just right for you and your situation.


With your explanations and some more digging on my part, an existing framework is a better idea.

quote:

Clear as mud?


Yes.

quote:
Originally posted by D-SIPL:
I would use on of the above libraries. The site i worked on was for a friend and will be going live very shortly i suspect. I'll give you a heads up when it finally does.


Seems like we all agree re-inventing the wheel isn't the best idea. I'm looking forward to seeing the site.

Thanks for the suggestions.

------------------
All Your Base Are Belong To Us!!! chown -r us ./base
"After three days without programming, life becomes meaningless.'' -- Tao of Programming Book 2

My Programming and Hacker/Geek related Blog

Xian_Lee

Member

Posts: 345
From:
Registered: 03-15-2006
While I don't like reinventing the wheel, and there are a lot of nice packages out there, sometimes it takes more work to learn someone else's code to change things (even little things) than it does to start from scratch. As such, I've built a CMS from scratch because of that.

All the same, if you can find an easily tweak-able tool out there, use it!

------------------
If games please me, and if it's possible to please God with games, why on earth wouldn't I make games?