11

I'm using an MVC framework to develop a web site, I've to care about the design in the sense of look and feel (views) and the code (models, controllers).

I don't know what is the best way to proceed:

  • code and design iteratively by small chunks?
  • design first ?
  • you've got the point

11 Answers 11

12

I suggest you design first - it can be a rough design with a pencil/paper but it will give you an idea of what information should go on the page in what manner. This will help you with your views and controller logic. Dont' worry too much about colours at this point.

I always feel it is better to do things iteratively. Design a page or two, construct the model and controller relative to that page, and repeat for other pages.

Sometimes if you spend too long in your models and controllers and neglect your views, you'll end up doing way more or way less than what you need.

1
  • 3
    Always design first. Coding first dooms many a project because they don't know what they need to do. Apr 22, 2010 at 19:16
5

The 37 Signals (the source or Ruby on Rails and some really cool web apps) book Getting Real advocates working from the interface down. It gives you a better sense of how the site will be used before you do too much back end implementation.

Here is the specific chapter: From ideas to implementation.

PS: Read the whole book, it's brief and a really good overall philosophy for building things the way they should be build. And no I am not affiliated with them in any way.

3

One small, but very good tip I got, was to work out what kind of 'friendly' URL's you would like to see in your site. This in turn leads you to what routes your require, which in turn gives you an idea of the controllers and actions you will have to create.

1
  • Definitely a good part of the design process, usually known as Information Architecture.
    – vfilby
    Apr 22, 2010 at 19:20
1

It depends but there are several rules of thumb:

  • the bigger the project the more it benefits from the design first, design well approach.
  • if there's inter-dependence between the elements of the project - such as lots of foreign keys in the database - you are better off at the very least designing everything around those inter-dependencies, or you're gonna regret it later
  • MVC frameworks enforce some design decisions by their very nature, so use that to help you
  • beyond a certain size - say more than a week's work - it's an absolute necessity. Same goes if it's a team effort

In your particular case, since I'm not sure about the project size, I'd suggest having your schema designed ahead based on your needs, which will tell you about dependencies, and then do the iterative thing, starting with the dependencies. If you have specific APIs you have in mind, it's a good idea to design around those as well

1

The beauty of MVC frameworks is it simply does not matter.

Obviously you'll need some vision to work to, but it's up to yourself. I'm a strong believer in iterative development. In this case you'd create a section of the site, views, models and so forth. Once that was working, move to the next section/feature of the site.

1

The both ways are OK but it would be better if you have a designed view (even a mock up) so you can know what data to get how to format it when you develop you model and controllers

0

My suggestion which will save you a lot of time and headache is start off with design.

You have two designs here. One is the UI (interface) design. All the visuals etc.

When you have a UI design you will know how to create your mark-up from the get go without having to do the work twice after you've completed a design.

The other is the software design. the MVC framework helps a lot with this but you also don't want to just start coding without having a plan. You'll find yourself back tracking a lot and recoding stuff you've already done that way.

0

An iterative approach is the way to go. I might suggest spending time on the model and getting it solidified first. Then, iterate through your controllers and views. This will help validate what you've done in the model, and bring up any glaring issues that need to be addressed sooner vs. later.

0

I, as most here would say design (at least to a extent) first. I would wireframe interactions (these can, and should be be refined later) and, perhaps most important, (at least if it's a traditional web site you're working on) plan the architecture, map the structure of the site you're working on (the Information Architecture part). In order to get an overview of the site and know map out user paths through the content.

That's at least my 'modus operandi' for web sites if I'm working alone on them. (I mostly work in a UX team so my professional workflow is more in the design part than production coding nowadays)

0
  • Understanding the Requirements
  • Database Design
  • User Interface Design
  • Business Logic Design
0
0

From my experience I would say you should always plan first. (I even plan my planning phase).

I assume you’re doing something like a GUI wired up via .aspx using the MVC model, maybe even the Entity Framework?

Web development like this can very easily get complicated once you start to build it up.
It is important that before you do anything you know exactly what it is that you are trying to do, this way you know when you are undershooting or overshooting your goals and whether or not the code you are writing actually fulfils the requirements.

There are many models which you can base your project development on, all of which loosely follow a sensible System Development Life Cycle in one way or another.

If you haven’t read up on the different development methodologies, here’s a site that will give you a good overview : http://www.itinfo.am/eng/software-development-methodologies/

Not the answer you're looking for? Browse other questions tagged or ask your own question.