Welcome Guest, Not a member yet? Register   Sign In
Best way to start off a new project?
#4

[eluser]n0xie[/eluser]
Quote:Just wondering is there a simple method anyone follows when starting a new coding project?
If it's a hobby project, just start somewhere. Build the basics first. So if you want to build a blog, make sure you can make new posts. Then make sure you can edit it. Then maybe add comments or categories or tags or whatever you think is important for your blog. The point is to work in iterations: make something work, then make it pretty. Then refactor to make it elegant.

[quote author="BrianDHall" date="1262081874"]As a general guideline I've found the best way for me is to first create a 'fake' application - a front-end that looks like the end product should look, at least with some degree of reason. Front-end first, in other words.[/quote]
If you do work for a client, I disagree.

The front-end or the part of the website that users/visitors interact with, is usually just a representation of data. How the data looks is irrelevant: it might be relevant to the client and your users/visitors, but for you, as a programmer, it's 'just a view'. So your first job, as you envision your project, is to map how your data flows through your application. Most websites are nothing more than pimped up database front-ends: data goes in, some computation happens, data goes out.

So what you need to do is get your data organised. Know how a RDBMS works. Draw out how you store the data, what the relationship will be with other data, and if possible, try to avoid duplicating data.

Once you have this in place build the code around it so you can access and manipulate the data. If you stick to some conventions you can auto generate this or use some ORM implementation to save you a lot of time.

After that you're pretty much done. Throw a design in front of it and that's it. Yes I know this is the part of the project that takes the most time, but the essence is that once you have your logic in place, the code you write should only be to build up some view and add some 'logic' to it.

They change the design? No problem. As long as the same business logic, business rules still apply, there shouldn't be a need to change any underlying code. You might have to write another function in your controller, add some exception here or there, and maybe add a custom function in your model with some special parameters, but it will most likely have minimal to no impact on your database structure, and thus the basis of your application. Note that all we do is add code to take care of exceptions/specific wishes: we are not changing any of the fundamental CRUD operations we already have in place.

I have learned that it is much easier to add a function here and there to do a specific task than to edit some logic in your database forcing you to rewrite half your application because the relationships changed.

Now if your client changes the business rules/business logic 80% in the project you do have a problem. This is were you should have your contracts and agreements in place to shield you from this. If you hire a painter to paint your house, you don't expect him to redo everything if he is 80% done, just because you decide that 'pink' would look rather dashing instead of the white you chose before.


Messages In This Thread
Best way to start off a new project? - by El Forum - 12-28-2009, 01:39 PM
Best way to start off a new project? - by El Forum - 12-28-2009, 03:56 PM
Best way to start off a new project? - by El Forum - 12-28-2009, 10:17 PM
Best way to start off a new project? - by El Forum - 12-29-2009, 05:52 AM
Best way to start off a new project? - by El Forum - 12-29-2009, 04:27 PM
Best way to start off a new project? - by El Forum - 12-30-2009, 01:10 PM
Best way to start off a new project? - by El Forum - 01-07-2010, 05:35 AM
Best way to start off a new project? - by El Forum - 01-22-2010, 12:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB