xunuoi / node-bigpipe

A super easy, lightweight Bigpie Module for Nodejs, Express, Sails, ThinkJS with good intergration for web framework
MIT License
77 stars 2 forks source link

How does this compare to the standalone bigpipe framework? #3

Open timellemeet opened 8 years ago

timellemeet commented 8 years ago

How does this compare to the standalone bigpipe framework? (https://github.com/bigpipe/), performance, stability and flexibility wise?

xunuoi commented 8 years ago

'node-bigpipe' module is nearly double performance to the bigpipe framework oweing to the lightweight design.

I haven't test too much on the stability, however, it looks stable in some production projects.

And the flexibility is great, because it is just a module, you can use it as what you want.

Just have a try . The ES6 version is recommended

Dransfield commented 7 years ago

Does this replace angular and ejs, or work alongside them?

Also, in the democontroller it says "Here call the Express/Sails render api" but I'm not sure how to do that.

xunuoi commented 7 years ago

@slenkar Hi, actually it's and node web-backend module, you can use it with ejs or other template.

And for the "Here call the Express/Sails render api", it called the render api inside the node-bigpipe. Here it doesn't need you do anything, it's just an explain for inside implementation.

Dransfield commented 7 years ago

thanks for the answer. Lets say a facebook page has 7 pagelets in one page, each pagelet needs to know the users name.

Does bigpipe fetch the user's name once from the database and give it to each pagelet? Or is each pagelet a completely isolated thing that reads the database itself.

I would like to implement this in a sails website I have already made. I have no idea how to do it yet. Im using angular for the front end and ejs templates.

Sails has a file called routes, which controls what happens when a certain web address is typed in.

So would the routes file be the first thing to change?

wxu-aa commented 7 years ago

Hi Slenkar,

You mean you are using angular and ejs only in Front-end ? So you only use ajax to load data and render template in js ? For this case, it's the SPA pattern, not involved in bigpipe or other backend optimization solution.

Maybe you can give me more detailed information for this so that I can figure out your situation.

On Tue, Mar 14, 2017 at 9:13 PM, slenkar notifications@github.com wrote:

thanks for the answer. Lets say a facebook page has 7 pagelets in one page, each pagelet needs to know the users name.

Does bigpipe fetch the user's name once from the database and give it to each pagelet? Or is each pagelet a completely isolated thing that reads the database itself.

I would like to implement this in a sails website I have already made. I have no idea how to do it yet. Im using angular for the front end and ejs templates.

Sails has a file called routes, which controls what happens when a certain web address is typed in.

So would the routes file be the first thing to change?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/xunuoi/node-bigpipe/issues/3#issuecomment-286416555, or mute the thread https://github.com/notifications/unsubscribe-auth/AQce2hADtI6cZKK6_4eN0Ge5ynp5bUIXks5rlpJngaJpZM4IdmYI .

-- *This email may contain or reference confidential information and is intended only for the individual to whom it is addressed. Please refrain from distributing, disclosing or copying this email and the information contained within unless you are the intended recipient. If you received this email in error, please notify us at legal@appannie.com legal@appannie.com* immediately and remove it from your system.

Dransfield commented 7 years ago

Its a website with several pages, homepage,profile page,stats page chessbond.com

For example the profile page, angular is used to display the variables on the page like the username gender,home city

ejs is just used like html really but is able to get the session , ejs is used to get the id number of the user from the session/cookie

Angular and ejs just seem to be used on the front end, I think. Like you said.

xunuoi commented 7 years ago

If all data are load by Ajax request, no need to use node-bigpipe.

If ejs data are queried from database, you can use bigpipe to render ejs template, refer to the DemoController.js.

I prefer you paste some detailed code for ejs so we can check is that match you

Dransfield commented 7 years ago

ok so in the profile page, the info is like:

Profile Updated: {{LookedatUser.ProfileUpdatedPhrase}}

which is Ajax requests,

ejs is just used to see the person is able to edit his profile: <% if (req.session.passport){ %> <% if (req.session.passport.user==lookedatuser){ %>

                <%}%>
            <%}%>

Hmm, actually I just had a thought, I am hiding the whole page until certain things are loaded via ajax. If I showed each part of the page individually as the requests come back I guess that would give a similar feeling of speed like faceborok.

Thanks for your replies.

Is bigpipe more for a website where the page is constructed on the server and then sent out?

xunuoi commented 5 years ago

For the server, just sending a very basic html framework should be enough. It depends on how you want compose your html structure.