Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
The Insect Court
Nov 22, 2012

by FactsAreUseless
It would be interesting to see a brief write-up of Meteor/Derby/other cutting edge frameworks, if anyone knows enough to write blurbs for them. I can probably toss one together for Meteor if nobody else gets around to it.

duck monster posted:

I still can't decide if meteor is some sort of future alien technology or potentially the most bonkers confirmation that the web design world has no memory for hard learned lessons of the past.

Some of it just scares me. Querying the database from the client side? Sounds like a recipe for tears to me!

Meteor lets you define allow/deny rules for client-side queries, but yes it is a bad idea to let clients have full write access to the database.

The Insect Court fucked around with this message at 08:16 on Sep 22, 2013

Adbot
ADBOT LOVES YOU

The Insect Court
Nov 22, 2012

by FactsAreUseless

Plorkyeran posted:

They sort of can replace Rails and Django. There's a large range of variation in how much of the logic goes on the server and on the client. At one extreme the server is just a thin wrapper around the database that handles authentication and security, and for that a microframework like Flask or Sinatra is more than sufficient. At the other extreme you can have everything but templating and animations and such on the server, and for that using a fully featured backend framework is nearly always a good idea.

This is one of the reasons I like the SPA approach(other than the fact that I am trendy as gently caress), it really shrinks backend complexity. You can either use something like tastypie/<Rails equivalent> with your old full-stack framework, or a zillion different options to set up a simple REST service. At the extremes there's stuff like Firebase, which eliminates the need for a backend completely.

Winter is Cuming posted:

Holy poo poo. This is loving what meteor does? Would you mind if I PMed you? I'd like to know your thoughts on something.

I've only used meteor for some toy projects so I can't speak to what it's like in production, but it's pretty fantastic for a certain type of site. It's stupid-easy to have a collection of data that is automagically synced between clients and the db in realtime. It uses tricks like optimistic database queries to improve responsiveness, so it can really give that desktop app feeling that most web apps don't quite have.

It uses its own packaging system, but apparently in recent releases they've improved npm compatibility a lot. My biggest complaint so far is that it's very "opinionated". There's no (supported) way to use anything other than mongodb on the backend, or Handlebars on the front-end. I'm also vaguely concerned with performance, since it seems to push a lot of data in response to changes in tracked queries.

The Insect Court fucked around with this message at 07:38 on Sep 25, 2013

The Insect Court
Nov 22, 2012

by FactsAreUseless

ambushsabre posted:

I'm interested in this as well, but just for ember since I've already got a pretty firm grasp of Meteor (I've done several apps over the last year with it). I learned Meteor by tinkering and looking up specific examples of what I needed, and reading the excellently clear documentation, but I don't really want to repeat that process with Ember and would prefer something more akin to like, a course.

As to your point, I know the realtime aspect of Meteor is really being flaunted, but I think it's greatest advantage is that it sets up the db's and everything for you, on a per project basis. It's so nice to just be able to start writing mongo when I make a new project and not have to worry about the drivers or connections or anything.

Apropos of that, anybody who wants an easy out of the box full-stack solution might want to take a look at the MEAN stack. It's Express, AngularJS, and MongoDB with Mongoose all wired together. Nothing you couldn't do yourself with a little bit of work, but this makes it even simpler to get a CRUD sort of site up and running.

wwb posted:

No SQL databases like monogodb (and other better options) give you false hope you can build a sustainable 2-layer application but you will be in painful positions long-term if you rely upon it for much more than advanced prototyping. Just 2.45c from a grizzled full-stack developer.

Why's that? NoSQL is going to be easier to scale, and there are more performant options than mongo(which is still pretty good). You lose some ACID guarantees, but depending on the application domain that's not super important.

Houston Rockets posted:

I think he was referring to the 2-layer part. NoSQL 4 life.

Never heard of 2-layer architectures before, just the normal 3-layer data/logic/presentation. Is 2-layer trying to shove business logic into the database?

The Insect Court fucked around with this message at 06:13 on Sep 27, 2013

The Insect Court
Nov 22, 2012

by FactsAreUseless

Ender.uNF posted:

Anyone have suggestions for organizing large applications? Most of the examples for various tools and frameworks are laughably simple, but if you aren't building the next Twitter, you end up with a mess. In ASP.Net MVC terms, a million partial views strung together, most of which have intimate knowledge of the HTML generated by other partial views because the app actually needs to support a complex layout suitable to replace a full-blown Win32 app.

I've been slowly chipping away at the problem by trying to make JS APIs that hide implementation details of each "widget" or "component" on the page, but it is difficult, error prone, and requires all the other devs on the team to avoid the temptation to just have their component assume it has a child grid named resultsGrid that must be 500px wide and can be refreshed with resultsGrid.Refresh().

We are dealing with million+ object datasets with each object having potentially 1000+ properties. The number of things the user can do is insane, there is no way the UI can be less complex or (laugh) a single-page application.

I would suggest AngularJS, which is pretty good about encapsulation. Directives sound like what you're looking for if you want a way to encapsulate repeatedly used bits of DOM + code to modify it. Obviously, it's still entirely possible to wind up with horrible spaghetti code with angular or any other framework, but angular plus at least a little bit of attention paid to best practices goes a lot of the way.

The Insect Court
Nov 22, 2012

by FactsAreUseless

Ochowie posted:

I've been playing around with Meteor and it seems like a really cool concept. One nagging doubt that keeps coming up is that it seems like you are buying into a full stack solution. In other words, if I was working on a mobile app and decided I wanted to switch to a native app rather than something like PhoneGap all of the server side work I did with Meteor is essentially useless whereas if I was using something like Backbone, chances are I could reuse my services with a native front end. Is there something I'm missing or is this just the tradeoff of using Meteor?

Nope, Meteor is "opinionated" and doesn't play well with others. The data exchange protocol used is open sourced, and a fairly simple pub-sub one, but I don't know of any existing libraries for iOS/Android that implement it so you'd have to do it yourself.

The Insect Court
Nov 22, 2012

by FactsAreUseless

an skeleton posted:

Forget the previous problem, have a new problem.

We can get jasmine testing to work for one "it" on our angular application, but each subsequent test fails, even if its just expect(3).toBe(3) and nothing else. The error we get is:
Error: [ng:areq] Argument 'fn' is not a function, got <name of controller>

Are you using angular.mock.module or angular.module in your initialization code?

Adbot
ADBOT LOVES YOU

The Insect Court
Nov 22, 2012

by FactsAreUseless

NtotheTC posted:

I hate AngularJS. Is it ok to say that here? Like really hate it.

Yes. AngularJS isn't that bad, but the documentation is lovely given how idiosyncratic it is in doing stuff, and the actual best practices for it aren't used much by the community(like 'controller as').

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply