Greetings to everyone! I'm a new member here, and would like to start an, as for me, interesting discussion. Sorry if there's been a similar/same discussion here, I tried to look for it, but couldn't find it.
I'm at the beginning of a new site. I haven't written a single line of code yet, nor done any design, but am still troubling about general solution design.
I've been writing sites in PHP for quite a while now (several years, but none professionally), and for 4 months now I have worked as an ASP.NET programmer. This new site I'm doing will be implemented in PHP. So, after seeing how stuff is done in ASP.NET+C#, after having some experience in PHP (made a forum "from scratch" for my faculty and an institution in the city I'm living in, made several applications for firms here, made sites for my own needs, doing scripts generating WML for mobiles, etc.), I'm at the beginning of this new site and I would really like to it as close to 'perfectly' as possible. I'm experienced mostly in C++ and C, and have great experience in UNIX programming. Now, however, different concepts of organising code, dilemma between OOP and procedural, should I use SMARTY or develop a templating system of my own? The biggest thing, however, is - how much each component should be flexible and extensible, where's the limit for this, and how to make it such. How to split the site into components, do I put localisation stuff into files with constant definitions, or I put it all into a database table?
All these questions might reasonably sound vague and unclear, but the point of this thread shouldn't be, the way I see it, answering these concrete questions, but rather explaining how You start organising stuff from the very beginning, what's the flow of your mind when splitting components and solving them separately, what you put into the database, what into data files, and what directly into your code, and how do you decide this? What is your templating system of choice? Other questions that you came across in your experience, even coding techniques and way of organising your directories when organising data, code, helper-files etc.
I'm sure there are a lot of good programmers here, and it's worth listening to their (your) advices and experience.
Solution design
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
A lot of your questions have been talked about previously; often individually as they each can create long threads. So I will focus on an overall conceptual answer.
The time line required by your project will often dictate what you have time to build and what to put off for a later iteration. You can't possibly build "perfect" the first time a piece of software goes out the door. It's just not realistic. In project management the rule is that there are three main points that have to balance for a project to be a feasible undertaking: time, cost and quality. Perfect means a massive level of quality, which therefore requires cost and time to go up accordingly. If your company is willing to invest a lot of time and money into the project then you might be able to hit it.
The point is, don't expect perfection on your first step. It's a progression to get there. Build a list of end level features you want. Now prioritize them into a list from "must have" to "that'd be cool." Now break down each "must have" into a progression of pieces that need to be built. Keep in mind that there are libraries for many many many things available. You don't (and probably shouldn't) need to build your own version from scratch of many things. If you think your own would work better, build a comparison between existing libraries and your best, realistic, guess at what your own would have. Include as much grit as possible; it really helps to evaluate your time requirements.
If you don't break stuff down, many of us, myself included, will just break down due to the huge leap it would appear to require to get from here to there.
If you don't understand all this, I'd suggest picking up a book on software project development. One I particularly enjoyed was one from O'Reilly: http://www.oreilly.com/catalog/artproje ... index.html
The time line required by your project will often dictate what you have time to build and what to put off for a later iteration. You can't possibly build "perfect" the first time a piece of software goes out the door. It's just not realistic. In project management the rule is that there are three main points that have to balance for a project to be a feasible undertaking: time, cost and quality. Perfect means a massive level of quality, which therefore requires cost and time to go up accordingly. If your company is willing to invest a lot of time and money into the project then you might be able to hit it.
The point is, don't expect perfection on your first step. It's a progression to get there. Build a list of end level features you want. Now prioritize them into a list from "must have" to "that'd be cool." Now break down each "must have" into a progression of pieces that need to be built. Keep in mind that there are libraries for many many many things available. You don't (and probably shouldn't) need to build your own version from scratch of many things. If you think your own would work better, build a comparison between existing libraries and your best, realistic, guess at what your own would have. Include as much grit as possible; it really helps to evaluate your time requirements.
If you don't break stuff down, many of us, myself included, will just break down due to the huge leap it would appear to require to get from here to there.
If you don't understand all this, I'd suggest picking up a book on software project development. One I particularly enjoyed was one from O'Reilly: http://www.oreilly.com/catalog/artproje ... index.html
- raghavan20
- DevNet Resident
- Posts: 1451
- Joined: Sat Jun 11, 2005 6:57 am
- Location: London, UK
- Contact:
I would be thankful if someone could provide resources on this same area.ml01172 wrote: how much each component should be flexible and extensible, where's the limit for this, and how to make it such. How to split the site into components?
Last edited by raghavan20 on Wed Dec 20, 2006 4:29 am, edited 2 times in total.
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
OOP. There, I solved your dilemmadilemma between OOP and procedural
If you read HFDP that question will be answered for you. "Encapsulate what will change" but in addition to this don't assume everything is going to change. Don't try to do too much as once. Do what you need and what you know you will need in the future and little more.how much each component should be flexible and extensible
You have to judge for yourself. What is more there are no hard and fast rules - case by case basis wins the racist...*ahem* race.where's the limit for this
Again read up on design patterns. You will see lots of different jobs involved in web development can and have been divided. A good place to start is to read up on the Model-View-Controller pattern. The Zend Framework has a great implementation of this.How to split the site into components
See the configure subpackage in the Zend Framework once again.constant definitions, or I put it all into a database table?