Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
timellemeet opened this issue May 13, 2016 · 9 comments
Open

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

timellemeet opened this issue May 13, 2016 · 9 comments

Comments

@timellemeet
Copy link

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

@xunuoi
Copy link
Owner

xunuoi commented May 13, 2016

'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
Copy link

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
Copy link
Owner

xunuoi commented Mar 14, 2017

@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
Copy link

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
Copy link
Collaborator

wxu-aa commented Mar 15, 2017 via email

@Dransfield
Copy link

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
Copy link
Owner

xunuoi commented Mar 15, 2017

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
Copy link

Dransfield commented Mar 15, 2017

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
Copy link
Owner

xunuoi commented Apr 26, 2019

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

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

No branches or pull requests

4 participants