Live data from Hacker News

Ask HN: Site from scratch or frameworks?

news.ycombinator.com

11–20 of 31 posts

Re: Ask HN: Site from scratch or frameworks?

#11
post #9

If you had learned the right framework, you would be able to develop your next project much quicker, and you'd be a more attractive candidate to companies who use that framework. I guessing the attitude of hn is use the right tool for the job depending on your requirements.

> you'd be a more attractive candidate to companies > who use that framework 1) That limits you only to companies that use that framework 2) He/she's mentioned wanting to turn the site into a money-maker, which means not job searching.

yeah working for someone else is depressing to me.

Re: Ask HN: Site from scratch or frameworks?

#12

Earlier quoted context omitted.

by job i mean money maker... That is true, probably build out the site and extend/fix the framework as necessary. Isn't it the same thing though?

If you use somebody else's framework, they can extend and fix the framework so you don't have to. And if that framework is open source, and somebody else isn't extending or fixing it for you, you can do it yourself. You can still hack on it, but you don't have to build it from the ground up. I respect building something from scratch so you can learn from it (I once wrote my own OS), but that tends to be helpful only…

i do use jquery for some of it, also got some methods from the internet to make some tasks easier. So its not totally from scratch.

Re: Ask HN: Site from scratch or frameworks?

#14
I'd definetly go for the framework approach. After building apps with and without frameworks, its a lot less painful to build upon something which exists already.

There are so many advantages to go framework, I can't tell everyone: - frameworks are (mostly) under development, so you can benefit from trends and improvements in web development

- frameworks are well tested

- frameworks are more secure. Do you have all holes for XSS etc. closed? Are you sure?

- frameworks have almost always a community behind it, so you benefit from other users knowledge and plugins

- frameworks have plugins. You don't have to write anything from scratch, like DB connections, authorization or file uploads

- frameworks have documentation. Unless you are the sole developer of your app, you really want to have good docs.

Do frameworks have disadvantages? Sure, but I don't think it outweighs the advantages.

Re: Ask HN: Site from scratch or frameworks?

#15
I've just spent a couple of years on a project that I've built 'from scratch' in PHP attempting to follow an MVC pattern and trying to do things the 'right way' as I understood them at the time.

It's got to the point now where mistakes are coming back to haunt me, and some things that should be easy are not due to decisions made previously. This is compounded by the fact that growth of the code has been somewhat organic, and I didn't have a chance to anticipate some of the things we've done in the last year.

The upshot of all this is it's now time to re-write everything, taking the project as it now stands as the 'spec' for the rebuilt version.

I've learnt a lot during the project, and I'm a very different coder to the one I was at the beginning. One of the main things I've learnt is that I don't have enough time to be working on the "would be nice"'s in building your own framework, getting results ends up taking priority over taking time to 'do it right'.

So for this rebuild I'll be using an existing framework for several reasons.....

The people building the framework have time to concentrate on how the underlying code is built, and don't have to worry about a specific implementation

As I don't have to worry about designing my application, I have a spec, I can spare the time to learn the framework properly as I re-implement

Once I'm up to speed with the framework I should, in theory, be able to design and build anything in future much more rapidly.

I won't have to write any more bloody boilerplate that I've been re-doing due to my lack of knowledge/foresight in growing my current codebase

It's fun to learn, and peeking inside the framework (possibly because I'll need to bend it to my needs) should teach me new tricks.

I don't think a decent framework should take away control of your code. I've had the luck to be able to take 4 weeks evaluating some of the options both in PHP and other languages and anything that leaves the underlying code in a 'black box of magic' has been discarded. There are plenty of options out there with excellent docs and api's and lots of room to bend things to your will.

My personal choice is to go onwards with Yii, but framework choice is fairly subjective and a whole other conversation.

Re: Ask HN: Site from scratch or frameworks?

#16
This discussion has a lot of good points:

http://www.oreillynet.com/ruby/blog/2007/09/7_reasons_i_swit...

Basically, you're not alone in liking that degree of control, but the guy admits that simply using a framework like Rails can help you develop better coding skills in any language, especially if you're unfamiliar with MVC architectures.

Re: Ask HN: Site from scratch or frameworks?

#18
I do not want to weigh in on the issue as a whole, but rather shed some light on an aspect you as a single coder have probably not given much thought to: accessibility and maintainability.

When I started using ruby on rails, adhering to all the conventions DHH came up with, especially the directory structure, felt like giving up a lot of control. And I, too, liked control.

But I had an epiphany when I first had to work with other people's rails code: Never before did it take me so little time to dive into and familiarize myself with someone else's code. I was productive at day one, while my customer did not really expect any results for the first 4-5 days.

So, if you ever plan on having someone else work with you on your code, or you need someone to take over maintenance of it, having a foundation that other people are already familiar with and where there is tons of documentation available, is a huge advantage.

But even if you stay alone on this project. With all you have learned, it is possible that you will approach your next project in a completely different way. In that case coming back to your old codebase in 6 months or a year will be painful. Having a consistent framework for all of your projects helps mitigate this kind of pain a lot.

Re: Ask HN: Site from scratch or frameworks?

#19
post #14

I'd definetly go for the framework approach. After building apps with and without frameworks, its a lot less painful to build upon something which exists already. There are so many advantages to go framework, I can't tell everyone: - frameworks are (mostly) under development, so you can benefit from trends and improvements in web development - frameworks are well tested - frameworks are more secure. Do you have all h…

Agreed, a framework is just a toolkit of best practices and useful tools.

Another benefit of using a framework is it lets you 'work' with other amazing coders. I have increased my php knowledge many times over by using symfony. Sometimes this happens because you just have to dive into the frameworks sourcecode to see what's going on.

Re: Ask HN: Site from scratch or frameworks?

#20
As a long-time PHP developer, I've worked on both frameworks and from-scratch applications, and from my experience, having even a minimalist's framework goes a long way toward organizing your codebase; it takes a lot of discipline and foresight to keep a from-scratch project organized.

If you enjoy maintaining control and knowledge of your entire stack, then I would highly recommend using the CodeIgniter framework. It's designed to take care of most of the tedious bits, while staying completely out of your way when it gets to the actual meat of your project. It's very easy to modify or extend if you need to, with IMO excellent documentation of its API. Yet it still manages to offer enough structure that even I can keep my projects organized with little effort.

I know there are a couple forks of CodeIgniter, such as Kohana, but I don't think they manage to capture or maintain the same level of raw simplicity or lightweight feel of the base CI framework. YMMV ofc.

Post reply on HN