I don’t like working on the UI. In the same article I wrote about the ambiguity of user interfaces in general. The idea of right and wrong isn’t so strong in the UI field than, e.g., in database programming.
Bootstrap is pretty good
Regarding HTML I liked the approach Bootstrap has taken. They make HTML more HTML-like which sounds crazy. But given that the standard elements look so terrible it allows you to use them again and at least it looks decent. Even better is that a lot of templates build on Bootstrap which means you can just buy / download a good-looking template and still just write your bootstrap code. Pretty good.
Web frameworks
I have to say that I’m still now satisfied with web frameworks. I still have to do to much work. Thinking back about using software like Borland’s C++Builder. Sure it wasn’t the greatest bit of software. But you know what? I could create a decent UI in a few minutes and just add my get and setters.
I didn’t need to care about events, or UI synchronization, or underlying threads and all that stuff. And I have to with modern web frameworks.
I think I said it again and again. I love my prototypes and PoCs. I don’t want to create the greatest looking site with the best UX but rather a decent one with least effort.
I want to demonstrate this with an example.
TODO app
Let’s take a standard simple web app like an TODO app. What do we want?
- Login
- Registration
- Add Task (what? deadline?)
- Delete Task
- List Task for today, tomorrow, all
Pretty simple. Here’s the thing. It’s basically just a database with an UI. Everything could be replicated with a database. I wouldn’t recommend doing it this was but I want to show how easy an TODO app could be.
Login
psql -d database -U user << password
Registering
CREATE USER user WITH PASSWORD 'password';
Add Task (what? deadline?)
INSERT INTO tasks VALUES (what, deadline);
Delete task
DELETE FROM tasks WHERE id = id;
List Task for today, tomorrow, all
SELECT * FROM tasks WHERE deadline = CURRENT_DATE; SELECT * FROM tasks WHERE deadline = CURRENT_DATE + interval '1 day'; SELECT * FROM tasks;
Let’s also create the boilerplate:
CREATE TABLE tasks (id bigserial primary key, what text, deadline date);
And that’s basically it. This may take you 5 to 15 minutes. It’s easy, it’s decently abstracted and it’s fun because you are so powerful. That’s also something I see when people write LISP or LISP-dialects. They try to create powerful code.
The problem of course is the rest you have to do when writing this web app. Creating HTML files, caring about user authentication, checking values, etc. etc. And that’s why I liked tools for rapid application development so much – I didn’t have to care about it.
Going in the right direction
I actually like that the web development goes towards using APIs to abstract the application and then building on top. I think that that’s the right way to do it – your presentation should be independent of the rest. And I really like what meteor is doing. And that being said
Thinking about it. I would be more than happy if there would be a tool to prototype an UI – and I mean prototype – no fiddling. There are interface builders for bootstrap out there – which is great. The next step is to integrate one of the JS frameworks – like Angular.js or Ember.js.
Example
Let me build my interface around a REST api. I know my calls just let me bind them to elements and their events. Let’s take the TODO app example. I build a quick interface using jetstrap:
This took me maybe 10 minutes. You see that it’s not ideal (e.g. the button is not aligned) and the UI creating the interface is a bit fiddly but it’s okay. The next thing I want to do is to bind REST API calls to actions and events in the interface. This is sadly not possible yet but here’s how the workflow could look like.
For example: I select the submission button and create the REST call URL using information provided by the builder. E.g. POST /task {‘task’: <TASK>, ‘until’: <UNTIL>}
The same could be done on the open tasks. I just describe the URL call and the return format and the rest is handed by the framework. E.g. GET /tasks {‘task’: <TASK>, ‘until’: <UNTIL>}.The server side can be handled with a few lines of code thanks to micro frameworks. And that’s it.