With the event of the jQuery templates plugin, I am wondering how to maintain both server-side and client-side templates.
Because in my case, I have some templates, that would be duplicates - server-side as well as client-side. Just imagine this:
You have a form, where you can enter list points. When you press submit, an AJAX request is generated but the entry is already showed on your page.
Now, the markup for this bullet point should be the same - wether it was generated through JS or by my PHP/.NET/whatsoever application.
Are there any good ways to maintain those templates / keep them in sync? Or do I really have to manually maintain both templates?
What is your experience in applications using JS templates?
If you like JS->PHP priority :) then you have this two jquery-tmpl compatible template renderer for PHP backend
If you prefer more PHP->JS priority :) then you can try this Javascript implementation of popular PHP templating Smarty
Or you can try something more neutral like:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With