vendredi 26 mai 2017

How do I go about creating an article/review template in a single page application?

I've been thinking about this for a while, trying to search the web, but every search query that contains the word 'template' inevitably returns endless results of sites that want to ram their (crappy) pre-fab html designs down your throat.

I'm looking for a consistent way of creating a template to show reviews on a website, preferably while not looking identical, in a SPA environment, Emberjs to be precise.

Even if I have one template, with let's say, 3 blocks of text with each a picture in between, I still need to consider whitespace and paragraphs. Something that's not really possible while operating from the crud section on the website, it's just plain text that goes into the block sections.

Suppose I have a lenghty review, and I want to add a fourth block, or an extra picture, I'll have to update the ember template, possibly ruining all previous reviews that are already posted.

If I were to do this in .NET, I'd just make a page for every review. Is this how I should be doing it on SPA's ? A new route for every review, ending up with hundreds of components/routes in the long run? Both scenario's aren't CRUD friendly though, I'll always have to go back into the code to add a page/route.

I now have the simplest of setups (pseudo-code):


 






Anyone with advice/experience on this matter ? Much appreciated ! :)

EDIT 1: Come to think of it... something akin to when I create my question on SO, would help. Save the review as a whole, pictures and formatting included, but is this even possible with Firebase ?




Aucun commentaire:

Enregistrer un commentaire