Как Вы планируете свое приложение для направляющих?

Они - просто разделители, которые позволяют Вам помещать специальные символы (как пробелы) в имени столбца или имени таблицы, например,

insert into [Table One] ([Column Name 1], columnname2) values (val1, val2)
14
задан Alexandre 20 October 2009 в 11:39
поделиться

3 ответа

I've got a 6 step process.

  1. I prefer to work out the model relationship and uses before doing anything. Generally I try to define models into units containing coherent chunks of information. Usually this starts by identifying the orthogonal resources my application will need (Users, Posts, etc). I then figure out what information each of those resources absolutely need (attributes) and may potentially need (associations), and how that information will likely be operated on (methods), from there I define a set of rules to govern resource consistency (validations).

    I usually iterate over my design a few times because the act of defining other models usually makes me rethink ones I've already done. Once I have a model design I like, I will start refactoring or specializing(subclassing) models to clarify the design.

  2. I write the migration and make skeletons for my models. I usually won't write tests until I have a first draft of methods and validations implemented. It's not always obvious how to implement things until giving it some moderate thought.

  3. Next comes the test suite. Doesn't matter what I used to write the tests, so long as I can be certain the backend is sane.

  4. This is when I piece together the control flow. What happens on a successful request? Unsuccessful request? Which controller actions will link to others? Usually there is a 1-1 mapping between controllers and models (not counting sub classes of models), every so often I'll encounter situations where I need to act on multiple model types, for that I'll probably create a new controller. Depending on how complex my app is I may model the flow as a state machine.

  5. Lastly I create the views. I start by sketching out the UI based which is heavily influenced by my model's relationships and attributes. Abstract out common parts, then write the views.

  6. Polish the UI. I create a CSS, and start to replace links with remote calls, or even just javascript when appropriate.

I may interleave steps 2 and 3. I find it's very easy to write a test just after I write the code to be tested. Especially because I'm usually testing things in a console as I write, and half the test is written by pasting from the console.

I may also compartmentalize steps 4 and 5 for each model/controller. Any point I may go back and revise, a previous decision, and propagate those changes through my steps.

38
ответ дан 1 December 2019 в 06:28
поделиться

I don't think writing only cucumber features as specifications is a good idea. Writing test code without be able to test it pass leads to errors in the tests and increases the time you'll need to correct them later.

So I'd do the following :

  • Write some mindmap. But keep it simple with the major ideas of the project.
  • Start writing tests and coding at the sime time (write one test, make it pass, write an other, ...).

So you'll write your specifications while driving your application. Keeping it clean but also remaining agile and being able to change some ideas in the middle of the project.

4
ответ дан 1 December 2019 в 06:28
поделиться

Я начинаю с эскизов пользовательского интерфейса, а затем перехожу к макетам HTML. Когда дизайн пользовательского интерфейса завершен, я могу определить ресурсы RESTful в приложении и их отношения.

5
ответ дан 1 December 2019 в 06:28
поделиться
Другие вопросы по тегам:

Похожие вопросы: