Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@MrkGrgsn
Copy link
Contributor

This is a proof-of-concept for unifying EPrints UI code generation in a templating system, using Text::Xslate. It works for citations, plugins and templates. There's some discussion of MVC and templating going on in #301 so I thought I would (finally!) make a PR of this in case it helped the discussion

My approach was to make the minimal changes required to support a template system and to ensure that it could work alongside existing templating, so that migration of all of core code isn't required to adopt the new templating.

I've included eprints citations, a default template and a version of the Manage Eprints page to demonstrate how it works in practice.

@jiadiyao
Copy link
Contributor

It's been two years. Are these still relevant?

@MrkGrgsn MrkGrgsn changed the title XSlate templating WIP: XSlate templating Nov 23, 2017
@MrkGrgsn
Copy link
Contributor Author

I haven't been following this project too closely but I understand the situation regarding generation of HTML hasn't changed (still a mix of citations and Perl code). Also the points from #301 still seem relevant and correct (to me), e.g., better separation of rendering concerns and data/object wrangling, and unifying rendering methods. So it still seems like an area of eprints that could be improved and I'd hoped that this proof of concept would help to demonstrate that but I have to leave it to you and the active community to judge whether it would have any real value.

@denics
Copy link
Contributor

denics commented Nov 24, 2017

I personally think that it is relevant, as demonstrated in #301. But why Xslate? it seems quite dead compared to other templates (tt2 for example, or even html::template).

@MrkGrgsn
Copy link
Contributor Author

Why Xslate? There were a handful of templating libraries available at the time, this one had nice features and claimed good performance. Nothing special in other words!

I don't think it's terribly important that this PR uses an unpopular/unsupported templating system, it could be swapped for another easily - the point was really to demonstrate that one could be integrated without breaking existing rendering code for a smooth transition to the new system and that using the template system made it much nicer to write the rendering for screen plugins and improved the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants