How to structure a single page meteor app with pixijs? - meteor

So I'm trying to port this fantastic tutorial -https://goo.gl/rTZA0d - on using pixi.js within meteor, and I'm rather stuck on how I can modularize the code outside of onRendered. Here's the gist - https://gist.github.com/anonymous/4502af95ce67465550fa.
What I want to be able to do is handle events via meteor and pass it into the pixi framework, and of course build the business logic around the framework inside of meteor and/or meteor packages. For example, a package module to handle the loading of assets, etc. I feel like I'm going up a creek without a paddle here, any ideas if this is a valid approach, and/or I'm wasting my time marrying the two. The thought of having a real-time framework using pixijs excites me, yet I'm not familiar with the how part.

Related

Any way to do transparent API for next.js?

Next.JS simplifies lots of stuff for creating the Web App. But the modelling data and the API and the data communication between the Server and the Client stays pretty much the same as in other React.JS apps.
A lot of code needed to be written to make it possible. I wonder if there's some approach or extension for Next.JS that would make it easier? Something like meteor or like that?
Realise this is an old question, but take a look at Blitz JS - this wasn't around at the time the question was asked, but has been one of 2020's top projects on Github. It's built on Next.js and is designed to abstract away the complexities of an API. It's trying to be the Rails of the JS world.

Account-base package on Meteor

I have to deploy now my app and I was wondering to my self if is a good idea bring apps to production with the account-base package. Wouldn't be better to manage this with our own methods?
I think trying to manage it all yourself is a sure fire way to run into problems in the future. The concept of accounts seems simple, but the implementation never is especially when you start sprinkling in all the extra complexities (registration, resetting passwords, validation emails, 3rd party authentication, role based authorization, complete integration with your app, etc.).
At the end of the day, you dont gain much by spending days (or more) implementing and testing (hoping that you got everything right) that stuff when you could be spending​ that time on building the next big app. I'd much rather use tried and try packages that have verified by thousands of users across thousands of apps instead of trying to roll my own.
It depends on your purposes and preferences. Since account-base seems to fit well on my projects, I recommend you to get the most out of it and don't waste your time reinvent the wheel.
However, in the scope of meteor, if you want to make changes to the package, you can clone it to the packages directory and modify it your way.
The solution is create as many fields as I want and onCreateUser get them and save this on my ddbb
More info: http://docs.meteor.com/api/accounts-multi.html#AccountsServer-onCreateUser

What router and ui-framework to use in meteor?

Just started to discover meteor. created app with DiscoverMeteor book, but misunderstood many moments. then read Your first meteor application and Your first meteor application books. Realized that Todos example is really too simple to cover many important things. And only after that I found the official guide on Meteor.com! now reading about all these complex (for my opinion) things. and have 2 questions:
What router should I prefer to use? I want to create fast app with lots of data loading from the server. Found information that Iron router is deprecated, and Flow router is recommended nowadays, but also found that flow router can not route on server, only on client. And that exactly client routing is the reason why for example soundcloud is really slow. So that is the question - I know nothing about server/client routing, but want to make right decision for the future project.
What ui-framework to use? I read that blaze is easy to start, but react js is really powerful. So: is Blaze enough for serious project (like a popular blog)? Or do I have to learn react js in order not to rewrite code in the future?
I am working with Meteor 1.3.2.4, which is latest in market and believe, you don't have to do anything out of the box to go with experimental UI-Frameworks and stuff.
Blaze template which is handlebars based implementation is best.
Blaze template is very well glued with Socket.io, futures and DDP implementation for cutting edge implementation for asynchronous and reactive behaviour on UI.
Blaze is really good for cumbersome, heavy data websites as well. If you have any doubt, i can skype and show you what i have implemented in just 2 days on development using everything given by Meteor.
React.js, Koa.js (re-written Express framework), express etc are very good and powerful, but I think implementing it at initial level of your grasp is overkill. Go with Blaze first.
There are hundered sitting and developing Meteor.js just for you to be comfortable. I am not at all biased, I am giving you my open opinion.
I worked with Laravel 5.2, Play framework, MEAN.io, DJango in past, but believe there is nothing like pure Meteor js with there own packages. There are many videos on youtube like Meteor nights and stuff where you can find the developers from all around the world developing huge stuff just using stuff given by Meteor js.
For routing flow-router is good, even iron:router is awesome and easily gettable.
This video can guide you very well.
Flow Router is the recommended router by the official Meteor Guide. It's also the popular choice these days, and for a reason: it's a high quality router implementation.
As for MVC, it's really like choosing a religion. React has a huge community, possibly a bright future, and it's not Meteor-only unlike Blaze. But some folks find Blaze templates nicer than JSX files. I think it's easier to get help on StackOverflow if you pick React, but Blaze might be easier to get started.
Maybe this post helps a bit: How to set up React with Meteor?

MeteorJS Alternatives: Latency Compensation Frameworks and Libraries?

Effort:
I am building a word game based on a chat web-client where I need to make a server call on input chat text to validate it before broadcasting on the chat.
I am aware of Meteor providing latency compensation out of the box. But given its still in "early preview" makes me seek other alternatives.
What I tried:
Unfortunately my web search for "latency compensation framework library" doesn't yield anything other than Meteor (including non-personalized results).
Question: Are there any other alternatives that provide latency compensation -or- can make the job easier? I am hoping other developers might have encountered something useful/relevant.
Although Meteor is in 'early preview', its code is very close production ready and a lot of startups and other early adopters are using it for production-level code. You aren't going to find anything that gives you wings like Meteor because no such alternative exists.
As a hardcore Meteor convert and someone who's used many other frameworks, I recommend you to just try Meteor out. As they say, it only takes a weekend for you to build an app in Meteor and decide whether it's right for you.
Having said that, I will attempt to answer the question and list the distant-second alternatives to Meteor that you probably won't want to use:
Derby
Sails
What you're seeing right now in the various real-time full-stack Javascript web frameworks is the future of Web development, cutting down dozens of people and thousands of man-hours of work needed to develop a software project. There are some fast boats sailing that are leaving server-side rendering behind, and you should probably just get in one of them and get going.
RethinkDB uses term 'latency compensation'.
I've also tried to gather per-feature alternatives to Meteor
Meteor is a really cool framework. you can build the complex data driven application very easily using meteor.
But, this framework currently supports only the MongoDB as back-end database.
I have recently created full stack framework called Nooljs which is similar to the Meteor. Now I have open sourced it. It support all the database connections including MySql, ms-sql, and MongoDB. The complex data driven application can be created easily using this framework.
This has been developed using well known existing framework such as Angularjs, Node, express-js, and socket-io.
Easy to build complex data driven JavaScript applications with minimum coding.
Support multiple data connections suck as Ms-sql, MySQL, PostgreSQL, and Mondodb.
Real time framework build top of Express-js and Socket-io
The client side is powered by the Angularjs.
The layout can be build using the Angularjs tags and elements.
Modularized layout to simplify the complex web pages.
Can be mixed both Express-js and Socket-io

Combine Meteor and Express

I am evaluating Meteor as an alternative to developing real-time capabilities using socket.io and it looks like awesome framework for single page real-time apps. It is great time saver that enables developer focusing on the business logic of the app, rather than writing boilerplate code. However, I find it still pre-mature for a medium size app with multiple pages/routings and REST api. Plus, number of features like i18n are still not available which requires some time investment to develop by myself.
I think that it would be great if I could combine Meteor and Express and use Meteor in use cases where it really shines.
Is it possible to develop an app using standard Express/Mongo stack and use Meteor for only specific part of the app where I need real time collaboration?
For example, can I share a session between Express/Connect and Meteor?
Thanks!
This does not directly answer your question, but I thought I'd throw it out there:
You should check out the community packages on atmosphere. Specifically, I'd recommend having a look at iron-router and i18n (I'll note I have not used the latter).
I've built a large production app that uses iron-router and it's running smoothly. You may also be able to use its server-side-routing capabilities to implement your REST api.

Resources