First user interface or logic?

While working on projects, I often encounter the dilemma of working with the user interface first or by logic. First, the user interface gives a good overview of what the final product will look like, while the logic first reveals any possible obstacles in the technology.

However, this is not always clear. Sometimes the user interface may require the data to be populated in order to really show what it means, and simulating the data can be more difficult than in addition to the logic. What is your preferred development approach and why? Which is more efficient and effective? (I see this question more and more with iphone projects)

+4
source share
7 answers

None.

In any case, you will have to think about the start of the project, deciding the general approach that you will take and what operations you will support.

Do it well enough and you will define the interface between the view and the underlying logic. Take a look at the Model-View-Controller approach for some inspiration.

What you want at an early stage is an idea of ​​what basic operations your logical code must do in order to achieve the goal. This will usually be a simple function call, but sometimes it may include more than that. This is clear at first.

Further, a complex system that works is based on a simple system that works.

This means that you will need to have a basic interface that you will use to test the basic logical implementation. The simple form with the button that represents the message is quite simple. Then it can grow, you implement some of the functionality, and then add a simple user interface with which you can test it.

It is easier to do both in parts, and the logic and interface for a small part of the logic are conceptually similar, and it will be easy to track both, while you implement and verify.

The most important part is to keep the interface and logical isolation, forcing them to talk through a common interface. This will allow you to make quick changes as needed and improve the look of the GUI to the end.

You can better refuse the user interface if you do not like it. All you have to do is use the same interface that you know how to do it because you wrote it and you already implemented it.

If at some point you realize that you made a big mistake, you can still save part of the code, again, because the interface and logic are separate from each other, and I hope the logic part is also quite modular.

In short: think first, make both the UI and the logic small increments and keep modularity.

+1
source

Iteration Back and forth. The user interface may change, as you understand how and what you can do with the logic and any restrictions that may be present. Logic may change as the characteristics, behavior, or performance requirements of a decent external interface change.

I do the smallest possible for everyone until I have barely working layouts. Then I use each layout to check where my assumptions about the right interface and / or logic may be right or wrong. Choose the most erroneous and start repeating.

Apple suggests first mocking the user interface on paper. (Have an eraser on hand ...)

+1
source

If possible, in parallel.

But personally, I first defend the logic.

0
source

First, I start with fundamental principles, which means that you must first encode the logic and work. There are two reasons for this:

  • If I can’t work correctly with logic, if a nice user interface is useless and empty of my time.
  • Most likely, you will change the interface when you work with the logical aspect, making the user interface process longer and more expensive.
0
source

I usually use my user interface in order. Cause? As I prototype various projects, sometimes my idea for an application changes. If so, then it does not matter - there is no code to rewrite.

However, it is sometimes useful to get the basics first to determine if the application will work or not. If it does not function, then why waste time creating interfaces?

0
source

I like to start by marking up various parts of my project in something like Vizio.

I create fields for different views that I expect to fill out, and I fill them with the information that I expect them to contain.

I am making another set of boxes for the expected model objects (logic). I fill them with information that I expect they will work with, and I draw lines between models and views where I think it will be necessary.

I do the same for object graphs (if I plan to use CoreData) and for database tables if I have an external database.

Performing a visual analysis helps me decide if any important functions or interactions between project components are missing. It also gives me something to quickly turn to if I later lose my appreciation of what I am doing. From now on, I usually work on the model until it’s enough to fill part of the view, then I work on the view until it can interact with the model.

I am also trying to identify views or models that can be reused for several purposes, so that I can reduce the total amount of work that I have to do.

0
source

Take a flexible approach and work with small amounts as in iterations. Slowly build each functional fragment of the program so as not to immediately create a monolithic piece.

0
source

All Articles