Building your own codebase vs using Frameworks

There was an argument yesterday as to which is the best way of building your own application like Twitter , Facebook. Would it be better to use a framework or build your own reusable code base resulting in a framework. Idd Salim <http://www.iddsalim.com/> says that a framework ties you down to its way of thinking and coding, and that it eventually becomes efficient to build your own frameworks like Facebook. -- with Regards: <https://twitter.com/#%21/denniskioko> <http://blog.denniskioko.com> www.denniskioko.com

Building your own code base is good if you have the time assuming you dont have existing functions and classes from previous projects. On the other hand a framwork has various advantages in that it has functions and methods ready for use. I partially concur with Idd and the other refute for one major reason, a good framework is extensible, scalable, stable after stripping un-used methods/functions and easy to use. For large applications especially where group development is required they come in very handy as very few methods need to be extended or "overridden", on the other hand they are an over kill for small applications. On Tue, May 10, 2011 at 3:56 PM, Dennis Kioko <dmbuvi@gmail.com> wrote:
There was an argument yesterday as to which is the best way of building your own application like Twitter , Facebook. Would it be better to use a framework or build your own reusable code base resulting in a framework.
Idd Salim <http://www.iddsalim.com/> says that a framework ties you down to its way of thinking and coding, and that it eventually becomes efficient to build your own frameworks like Facebook. -- with Regards:
<https://twitter.com/#%21/denniskioko> <http://blog.denniskioko.com>
www.denniskioko.com
_______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------ Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke

*A long winding story, you can skip to the bottom* This is an argument which can be argued from many sides, therefore, let me give my personal opinion: I started off writing script based PHP, where each file handled its own database connection, logic and presentation logic. Then I grew up a bit and started using include files, especially for the database connection. A little way down this road, I started using include files for other parts of the page, specifically the header and footer. Later on, I stumbled upon the nirvana of using functions in include files, now I could include one large file and call sweet little functions in various parts of the code, pure bliss. Something funny then happened, these functions tended to coalesce into types, so for example, I had an include file for functions which do interface stuff and functions which do 'logical' stuff, and of course, a generic include file which had functions which did generic stuff, e.g. mysql_escape_string(striptags(trim($_POST['username']))); This was the turning point. I found myself re-using these include files over and over again, therefore, I found myself writing the functions in a generic way; in essence, I was building a framework without knowing it. Now, if I am doing a sizeable PHP app, I wouldn't dream of using any of the above methods, CodeIgniter is the way, but this is just me. How long did the above take? About 5 years. *Point *There are distinct advantages of using frameworks over your own 'framework' for normal CRUD based apps. However, there are situations where frameworks don't just make sense i.e. they are an overkill, or are simply in-adequate, e.g. Facebook, twitter etc *Your answer *Frameworks (i.e. CI, ZF, CP etc) will get your app to the market faster than anything else, but as your app grows, these frameworks will become insufficient, therefore you will need to do your own. But at this time, you already know how to create a framework better than those publicly available, therefore, it will be the best logical move. IMHE On Tue, May 10, 2011 at 3:56 PM, Dennis Kioko <dmbuvi@gmail.com> wrote:
There was an argument yesterday as to which is the best way of building your own application like Twitter , Facebook. Would it be better to use a framework or build your own reusable code base resulting in a framework.
Idd Salim <http://www.iddsalim.com/> says that a framework ties you down to its way of thinking and coding, and that it eventually becomes efficient to build your own frameworks like Facebook. -- with Regards:
<https://twitter.com/#%21/denniskioko> <http://blog.denniskioko.com>
www.denniskioko.com
_______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------ Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke

If you want to write your own framework, be prepared to document. If your project is going to be as succesful as you dream of, then you are going to have to work with other programmers as well .. and they will need documentation. That said, given the time + food and fuel money I would roll out my own framework any day. It's actually exciting. On 10 May 2011 16:53, Peter Karunyu <pkarunyu@gmail.com> wrote:
*A long winding story, you can skip to the bottom* This is an argument which can be argued from many sides, therefore, let me give my personal opinion:
I started off writing script based PHP, where each file handled its own database connection, logic and presentation logic.
Then I grew up a bit and started using include files, especially for the database connection. A little way down this road, I started using include files for other parts of the page, specifically the header and footer.
Later on, I stumbled upon the nirvana of using functions in include files, now I could include one large file and call sweet little functions in various parts of the code, pure bliss.
Something funny then happened, these functions tended to coalesce into types, so for example, I had an include file for functions which do interface stuff and functions which do 'logical' stuff, and of course, a generic include file which had functions which did generic stuff, e.g. mysql_escape_string(striptags(trim($_POST['username'])));
This was the turning point.
I found myself re-using these include files over and over again, therefore, I found myself writing the functions in a generic way; in essence, I was building a framework without knowing it.
Now, if I am doing a sizeable PHP app, I wouldn't dream of using any of the above methods, CodeIgniter is the way, but this is just me.
How long did the above take? About 5 years.
*Point *There are distinct advantages of using frameworks over your own 'framework' for normal CRUD based apps. However, there are situations where frameworks don't just make sense i.e. they are an overkill, or are simply in-adequate, e.g. Facebook, twitter etc
*Your answer *Frameworks (i.e. CI, ZF, CP etc) will get your app to the market faster than anything else, but as your app grows, these frameworks will become insufficient, therefore you will need to do your own. But at this time, you already know how to create a framework better than those publicly available, therefore, it will be the best logical move.
IMHE
On Tue, May 10, 2011 at 3:56 PM, Dennis Kioko <dmbuvi@gmail.com> wrote:
There was an argument yesterday as to which is the best way of building your own application like Twitter , Facebook. Would it be better to use a framework or build your own reusable code base resulting in a framework.
Idd Salim <http://www.iddsalim.com/> says that a framework ties you down to its way of thinking and coding, and that it eventually becomes efficient to build your own frameworks like Facebook. -- with Regards:
<https://twitter.com/#%21/denniskioko> <http://blog.denniskioko.com>
www.denniskioko.com
_______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------ Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke
_______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------ Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke

The best solution to this is to draw a comparison table between the two paths and find out what best suits your PROJECT. That way *bias, politics and opinions can be eliminated* early. Siasa ni mbaya sana. But if the time,funding, programming skill ..etc is adequate then i would think building from scratch is an overall better idea.

Continuing this discussion, I have just finished a simple web app<http://www.cio.co.ke/cio100/>on Django and was surprised that it scored 88/100 on Google's Pagespeed <http://pagespeed.googlelabs.com/> . So I researched on who was brave enough to deploy Django on a large app and behold, Disqus<http://www.disqus.com/>. They even have a Pycon presentation on their experiences http://www.slideshare.net/zeeg/pycon-2011-scaling-disqus-7251315 .
participants (5)
-
Dennis Kioko
-
James Nzomo
-
Nd'wex Common
-
Ndungi Kyalo
-
Peter Karunyu