7 ms·
Isobuild: why Meteor created a new package system
- panarky 12y agoThis is awesome. With Isobuild and Cordova, you'll be able to add a camera package to your app and use one simple Camera.takePicture() API to take a photo, and then type one command to build your app not just for the browser, but for the iOS and Android app stores too.
- icholy 12y agoBecause running the cordova commands is so hard.
- imslavko 12y agoYou will be surprised, but I believe it can be hard for a lot of people who come from the webdev background. When I just started with Cordova, I went to a HTML5DEVCONF talk where the speaker tried to install (just install) Cordova in a 20m slot. He failed, his slides had all the ingredients (Xcode, jdk, ant, maven, npm, cordova, ios-sim, etc) but on the live demo his new machine failed because some of the many steps wasn't satisfied. About using Cordova: again, for newcomers, it is so non-obvious: what do you do when your build fails? How do I debug this objective-c code again? Why the heck Cordova doesn't give me all the logs by default? ios-sim is an npm module that is compiled with a C compiler and the build process is navigated by rake - ruby-based make clone.
- richardwhiuk 12y agoAs if anything is that simple. Where will the photo be stored? What effects will be applied? What format will it be in? How large will it be? What happens if it requires a permission request (e.g. in browsers and on iOS)? Will it auto generate the manifest file?
- astrodust 12y agoFor example, JPEG returned as a string or as part of a result object. Why is this so impossible to imagine? The rest is all options you can specify.
- richardwhiuk 12y agoSimple API is almost always a synonym for feature limited. APIs are often complicated because they have a lot of power, flexibility or functionality.
- igl 12y agoEverything about Meteor reads like a marketing article. How about: - It defines global variables. - The documentation is full of red warning messages and "this will be easier in the future" - The code is pretty unorganized and has some wild pieces in there. - do any of your friends use/heard of meteor?
- matthewmacleod 12y agoI don't think that's fair at all. The whole point of Meteor is to play with different approaches to web development that will be required in the future (if you want to build big distributed, interactive web apps). It's not finished yet, and they're pretty upfront about that.
- cmelbye 12y agoI'm curious, what part of Meteor will be a requirement for future web development? Are we not already building big distributed, interactive web apps without using techniques that Meteor introduced?
- sferoze 12y agoCurrently, I don't think Meteor's main advantage is bringing new capabilities, but rather providing a platform for building modern web apps. So it is different than any one javascript framework in that it's goal is to bring together a complete set of technologies that are needed to build an app, rather than the developer joining different pieces themselves. Currently many developers work with separate multiple frameworks, and Meteor brings them together into a cohesive, power, clean API. Meteor is amazing, and even with the rough edges, and evolving API, it is still a joy to work with. They are thinking about the big picture and it really allows the developer to focus more on the creative aspects of your app. I am excited to see Meteor evolve over time.
- mark_l_watson 12y agoI can't agree. I used Meteor to rewrite an app that I had previously used Clojure and Clojurescript for. It is faster to rewrite an app having written it once already, but still: it took half the time, had better user login/auth, and had sort-of real time multi-user support. Meteor is very nice. Try it on a small project. The learning curve is easy.
- untog 12y agoSounds interesting, but the devil is in the details. To use their example, HTTP.get() will have to deal with CORS on the web, but not in apps. If you end up with dozens of "oh yeah well for X you just need to add Y" situations then the utility is kind of wasted. And to be honest, I still don't get why this requires a new package manager. NPM (with a utility library, perhaps) could perform most of these functions.
- rational-future 12y ago>> HTTP.get() will have to deal with CORS on the web, but not in apps You can still use exactly the same code in the browser and on the server. Allowing stuff like server-side rendering on old browsers and JS rendering for the majority of users from a single piece of code.
- untog 12y agoBut you can't. If you are in a client browser (any client browser, no matter how old) and try to do HTTP.get('http://www.google.com' http://www.google.com') it will fail because of CORS restrictions. If you do that on the server or in a native app, it will succeed (because they do not have CORS restrictions).
- catshirt 12y agothe code doesn't fail, the response just differs by client. for the purposes of your example, the "server" is a actually a client. and that's not a problem for the package manager to solve. if anything, isn't this a great argument for a client/server package manager? you could write a library that knows to use and create a proxy if a specific client type tries to fetch cross domain.
- rational-future 12y agoYes, we can :) Working around CORS is just a matter of server configuration. With the same API you only fix the servers, with different APIs you have to fix both the servers and the code.
- jordanlev 12y agooff-topic (but perhaps related to the general usefulness of meteor): I browse with cookies and localStorage disabled by default. Every time I go to the meteor site to read something, the page just continually reloads itself without ever getting anywhere. I understand that some sites require cookies or localStorage to function (although I think it's nuts that that would be required for a site that is just displaying content and not an interactive application), but at the very least put up a message saying that cookies and/or localStorage must be enabled instead of just making my browser freak out. Thanks, can't wait to actually read about them without having to open a different browser :)
- chubot 12y agoNitpick: does the term "isomorphic JavaScript" to describe JS that runs on both the client and server annoy anyone? Where's the isomorphism? When I think of isomorphism I think of two things that look different but have the same structure. If you had a set of functions that are synchronous and a set that are async, then maybe you can call the sets isomorphic. Or if you have a Python library that mimics a command line tool, then they could be isomorphic.
- tel 12y agoThat annoys the hell out of me. It's a cool word, sure, but it also has an incredibly tight technical meaning of which "runs of server and client" seems to have next to no relation.
- deleted 12y ago[deleted]
- kaoD 12y agoIso = Equal. Morph = Shape. Isomorph = Same shape. Isomorphic JavaScript = JavaScript that takes the same shape [in multiple environments]. You're thinking isomorphism as math terminology but it isn't. It's just borrowed from Greek. From a quick search it means "same shape" in regular English too! Your nitpick would be akin to being annoyed by the use of "group" to mean "a number of people or things considered or classed together" because it has a specific meaning in math.
- tel 12y agoMath and CS are close enough that I think they should be nice neighbors and respect one another's terminology. I use the mathematical term "isomorphism" daily almost hourly while programming.
- kaoD 12y ago> should [...] respect one another's terminology I see your point, but IMHO isomorphic is a word, not math terminology. Math borrows words from regular languages, but it can't expropriate words! The first thing I think when reading "isomorphic" is "same shape" even though I know what a math isomorphism is. Just notice how function means something completely different in programming and math, but we're so used that nobody nitpicks on HN. Math permeates everything, borrows and loans words. More examples: - Electrical Engineers use finite ground planes even if a plane is by definition infinite and has no thickness. - Music is pretty much math, but their chords are not segments inside circles. - We use braces {} to delimit blocks, not sets. - We flip bits in a non-geometrical sense. - The DOM has events even though there are no statistics involved. - We compress files even though they're not geometric objects. - We use domain names. And so on. It's the beauty of language! Our libraries are full of functions instead of books. If there's no chance of ambiguity, who cares?
- mjackson 12y agotl;dr: "We want to build isomorphic apps, so we wrote a new package manager" Coupling the goal of building isomorphic apps with the need for a new way of managing packages to accomplish that goal doesn't make any sense. How you install packages and manage dependencies has absolutely no bearing on what you can or cannot do with those packages. In other words, you can write fully isomorphic apps using npm as your package manager. We're already doing it.
- deleted 12y ago[deleted]
- mjackson 12y agoThat should be part of your build system, not your package manager.
- general_failure 12y agoThe specific http issue is already solved by browserify. http://browserify.org/ http://browserify.org/
- ajacksified 12y agoI've been using browserify for quite a while now, and browserify is absolutely fantastic and handles building "isometric" apps with elegance. I suppose it's nice that they bundle some functionality in like `camera`, but I don't see why that would be an "isopack" thing and not just an external library. And anyway, doesn't building a framework-specific package disregard the "isometric" ideal: write once, run anywhere? (as long as "anywhere" means that it's using meteor.)
- rational-future 12y agoBrowserify is just a hack, Meteor seems to be looking for a clean, long term solution.
- jimmytidey 12y agoWhy do Meteor care so much about you starring them on Github?
- aioprisan 12y agoIt's a good way to drive the point home, by adding that last sentence in every post. An effective way to spread the word. What's wrong with asking that? For the past projects that I open sourced, I asked people to star them if they found them useful.
- hywel 12y agoWhy start from scratch? Seems like reinventing the wheel to start from a blank slate rather than forking npm etc. I guess forking doesn't get you to the top of HN though.
- avital 12y agoFrom https://github.com/meteor/meteor/pull/516#issuecomment-12919473 https://github.com/meteor/meteor/pull/516#issuecomment-12919...: "If you think about it, if we tried to build all of the above on top of npm, it would be npm in name only. Even if Meteor packages were in npm, you wouldn't use the npm tool to find or install packages (you'd use a wrapper that implemented the 'release snapshots', 'curation', 'repeatability' considerations), nor could you drop them directly into existing npm applications (per 'client vs server' and 'asset bundling')."
- hywel 12y agoThat's a good find but I'm not suggesting they wrap npm, but that they fork it. I don't think this comment explains why they couldn't fork their spangly new system from a robust existing one.
- arbesfeld 12y agoIf you're curious, here is the video of the Cordova integration that he mentioned: https://www.youtube.com/watch?v=4dJLPLWMImw&index=11&list=UU3fBiJrFFMhKlsWM46AsAYw https://www.youtube.com/watch?v=4dJLPLWMImw&index=11&list=UU...
- pantalaimon 12y agoThat website is a prime example for https://news.ycombinator.com/item?id=8237996 https://news.ycombinator.com/item?id=8237996 It's really just text and a few images, nothing fancy, an ordinary blog post - yet it freezes my browser for what feels like half a minute while it uses 100% CPU for rendering. What the fuck?!
- sogen 12y agoThere's a huge .JS file in there, it has the whole site or so it seems. It has content: * the blog * Other pages like Get involved
- MisterMashable 12y agoWe can only hope their new package system will contain something that allows the programmer to chose their own database. I want to use Couchbase and Elasticsearch. I can't see why any other document store couldn't do the same job as Mongo. Don't get me wrong, I'm ok with Mongo (but it's not for me) but can't we make at least some choice???
- imslavko 12y agoYou can make your choice! The problem for a lot of people: you need to write a real-time adapter if you want it to be efficient and performant. We have implemented Redis adapter, for example: https://www.youtube.com/watch?v=-Vnb8tjnE3k https://www.youtube.com/watch?v=-Vnb8tjnE3k
- joeyspn 12y agoI really don't mind about the packaging system, I think that the meteor team should put special emphasis in solving the scalability issues, cos right now (IMO) is the major barrier for adoption. I find really useful all the features they're launching but there's no way I'm going to pay for a 8Gb and quadcore server just for supporting 100 concurrent visitors... I started building a real-time webapp with meteor and had to switch to express + primus which was a much more efficient solution (orders of magnitude). I really hope they do something about it ASAP... I really enjoyed working with meteor and still use for small projects, but for a medium/big app? not yet...