Live data from Hacker News

Build Software from Front-to-Back

happyvalley.dev

51–60 of 108 posts

Re: Build Software from Front-to-Back

#51
I like building pretty skeletons of a product first, which helps to dream up natural interfaces uninfluenced by the structure of a "backend". I've seen a lot of people conforming their frontend to some predetermined backend structure completely ruining the end user experience.

Also found there to be a motivational aspect to this. Since I can't push the buttons or turn the knobs because its just UI at this point, I can't help but breathe life into it so that I can actually use it.

Re: Build Software from Front-to-Back

#52

I'm going to disagree with both approaches, and suggest (for lack of a better term) "middle-out". Always define the API first . Figure out the information necessary, and make sure it meets both front-end constraints (e.g. no information is missing, does it need to be one call or multiple calls, etc.) and back-end constraints (can this be efficient to retrieve from the database, does one server have all the info, etc)…

IMO backend constraints are usually less stringent than the frontend part. Mocking the front first avoids a lot of designing round trips I think.

For instance if on the frontend you need to display an infinite list of items, how you get your data can be heavily influenced by your interface. If you plan on having a super fast scroll with the user flying through the items, you might want to do it differently than for a page by page site.

If you design API first you must make this choices upfront, and you paint yourself in a corner if you change opinions when the resulting UX is in your hands and you’re playing with it.

Re: Build Software from Front-to-Back

#53
That’s where https://miragejs.com/ helps. I’ve built few fully functional prototype apps with full UI/UX without a single line of backend code and with front-end acceptance tests.

If you’re prototyping greenfield product, it’ll morph many times as you build it. Once you’re happy where it is, and you’ve stabilized on data structure (not database schemas), then just start replacing mocks withr your API calls. Acceptance tests will tell you if you’ve done it right.

Re: Build Software from Front-to-Back

#54

Always interesting to read how others work. I'm a backend dev who does quite a bit of frontend though I deeply dislike the current state of frontend (bring back Webforms) For me it all starts with the database, always. Code, ux, network is all ephemeral. The schema, the invariants and the data are forever. (this is also why I think microservices are often the wrong approach, you're solving a code problem at the expen…

the linux command UI (for actions/services) and spreadsheet UI (for data) are the best interfaces that have lasted for over 40 years.

Anything else is ephermal.

History is littered with millions of enterprise software that can't beat the simplicity of a spreadsheet or the flexibility and efficiency of a unix command line

Re: Build Software from Front-to-Back

#55

isn't everyone building front to back? You firstly establish a purpose of your solution. Thinking the job to be done, the users, the features.. Then you do a design. Likely you have a design team, that does research and creates wireframes or high fidelity mock ups. Then you establish requirements for the various layers in your stack. So what I described is a fairly typical process. It is front to back. I can't imagin…

There are plenty of reasonable ways to build web applications. If the process you described works for you, that's great, but others do find different strategies effective too. For example, your process puts great emphasis on the visual design. To me, that aspect is almost entirely orthogonal to the software design. That's not to say it isn't important to getting a good end result, but once you know what interactions…

good point, if you are building software for other systems to consume, the UX portion is not applicable, nearly as much

Re: Build Software from Front-to-Back

#56

Always interesting to read how others work. I'm a backend dev who does quite a bit of frontend though I deeply dislike the current state of frontend (bring back Webforms) For me it all starts with the database, always. Code, ux, network is all ephemeral. The schema, the invariants and the data are forever. (this is also why I think microservices are often the wrong approach, you're solving a code problem at the expen…

> For me it all starts with the database, always.

I agree, though I generally reduce this question to, "what is the shape of my data?".

Re: Build Software from Front-to-Back

#57

I'm going to disagree with both approaches, and suggest (for lack of a better term) "middle-out". Always define the API first . Figure out the information necessary, and make sure it meets both front-end constraints (e.g. no information is missing, does it need to be one call or multiple calls, etc.) and back-end constraints (can this be efficient to retrieve from the database, does one server have all the info, etc)…

That is usually the best approach. It can still bite you in the ass, though.

Sometimes that approach leads a project into a cemented API and new requirements that arise after real world application can be even harder to implement as a result.

So I guess I’m not arguing, but agreeing while adding that the approach needs a couple qualifiers.

Re: Build Software from Front-to-Back

#58

I think going in either direction is gonna have flaws. Sometimes frontend informs the backend (rich user flow -> data dependencies) and sometimes backend informs the frontend (often suggesting more composable and maintainable designs) I've worked on projects that were very front-to-back and without having a constant eye towards the backend, the UI requirements would have ended up dictating a non-composable, non-exten…

There's something to be said for treating it as an iterative process in layers. At first you have no specification, then you have a bad specification, and then increasingly good ones. The final implementation itself comes from having a good spec, and when you have that it should not matter which you start with.

The trouble comes in keeping a clear idea of what an iteration is supposed to test or accomplish beyond "makes it better" - and an end-to-end iteration is expensive. That is where the idea of putting the data model or UI "first" develops, since it lets you build from the technical details towards the concept, as a way of constraining and filtering your thinking.

Something I want to try but have not gotten around to willfully doing, is to treat the initial design stages as an exercise circuit of focusing on each layer for a limited period of time each day, rotating from one to the next.

I'm pretty sure that you could get some great results if a work week were spent doing a four hour cycle, with one hour each thinking and researching data, interfaces, UI, and premise/market.

Re: Build Software from Front-to-Back

#59

I'm going to disagree with both approaches, and suggest (for lack of a better term) "middle-out". Always define the API first . Figure out the information necessary, and make sure it meets both front-end constraints (e.g. no information is missing, does it need to be one call or multiple calls, etc.) and back-end constraints (can this be efficient to retrieve from the database, does one server have all the info, etc)…

In most cases API comes last, after the data and UI. This is just the state of things unless you intentionally building an api service from scratch. Data stays forever and in many times serves more than one application, UI changes all the time and might connect to more than one data source. API is the decoupling between those two and in most cases dictated by both, not the other way round.

Re: Build Software from Front-to-Back

#60
I would figure you simply break it down into three components. Front end (presenters) middle (plugin's) and back end (managers). The managers know nothing of the front end and the presenters know nothing of the managers. That way you can always swap out your UI for a different one, right?

If this is the case then you should develop the plugins first.

Post reply on HN