3 ms·
Thanks for your comments. I agree with you that there have been lots of framework (Express, Koa, Sails, Angular, Hapi, Total, React/Flux, etc) in node, but ther
by benlue 12y ago
Thanks for your comments. I agree with you that there have been lots of framework (Express, Koa, Sails, Angular, Hapi, Total, React/Flux, etc) in node, but there are still something missing. Each framework has its own merits, and I don't really like to go over who miss what kind of argument. I just like to share some view points with you:
. Everyone loves to reuse code, but we don't really have any framework which could help us to achieve that. In coServ, we design 'block' which is similar to what 'class' means to OOP. If you check demo of the coServ website, the source code of the example showing two RSS feeds is actually much shorter than the example of showing one. That's the power of code reuse. Also, 'block' is like a server side web component (https://www.polymer-project.org https://www.polymer-project.org), and web component, imho, is very promising.
. Many projects try to solve problems by introducing new syntax over existing standard. Sometimes that's necessary because syntax is the the exact problem they want to solve (e.g. coffee script). However, if everybody does that we'll have fragmentation issues. Based on that, I'd prefer EJS over Jade as the template engine, and that' why we use a EJS-like template engine in coServ. Actually, that's one of coServ's missions: don't create new syntax for developers to learn unless it's absolutely necessary.
. In my slide I use Rails as a metaphor to point out that we may need a more advanced web framework for node. In reality, coServ is nothing like Rails (well, it's Sails emulating Rais, at least that's what they said in their website). coServ is much cleaner and more concise: not just in framework itself, but also web applications created by coServ.
. I agree that dynamic HTML/CSS/JS would produce none-portable codes. We use dynamic HTML/CSS/JS in coServ as a convenience so we don't have to invent syntax or even a new system. Portability or reusability is achieved by 'blocks' as mentioned earlier (please try the RSS example in coServ demo).
I understand a new framework has to fight it's chance to be tested and used. Sometimes we create things not because we know it's going to be very popular but because we believe things could be done in a better way. If I could, I'd invite you to check the source of the coServ demo. Look for the 'index/blocks' directory. It's really simple and straight forward. I can promise that.