|
I'm already designing a pretty client-driven SPA application that uses ASP.NET MVC. I'm still building the models of the server side so I haven't gotten to anything client or view related. That's the very last thing I do. But I want to know which client framework would probably be best with ASP.NET MVC. Apparently Knockout is included with ASP.NET MVC. Anyone have any opinions on that? Oh and I am clean shaven but I'm wearing skinny-ish jeans.
|
# ? Sep 23, 2013 19:49 |
|
|
# ? Apr 19, 2024 07:56 |
|
You can pretty much separate the two completely. Use .NET to handle all of the server side stuff, and it comes down to preference for anything client side that I can imagine at the moment. You can post your AJAX requests to your controllers server side and use the data pretty much exactly the same as a standard MVC app. Format your MVC view to spit out some JSON or something server-side and parse it with the front-end framework.
|
# ? Sep 24, 2013 18:16 |
|
JediGandalf posted:I'm already designing a pretty client-driven SPA application that uses ASP.NET MVC. I'm still building the models of the server side so I haven't gotten to anything client or view related. That's the very last thing I do. But I want to know which client framework would probably be best with ASP.NET MVC. Apparently Knockout is included with ASP.NET MVC. Anyone have any opinions on that? I just struggled with knockoutjs for a week. My data model was a bit complex, and it was a pain to get everything observable. After a while I went to the mapping plugin but it made everything worse. Then I used the viewmodel plugin, and while that was somewhat better, certain properties were not observable sometimes (and I was never able to figure out why). Yesterday at 4pm I said, gently caress it and went to angular. At 7pm i went home. At 11 am this morning I was done with the page. Everything was bound properly, the html elements were all behaving as they should. It was a pure joy. I went first with knockout since all I needed was data binding, and knockout does only that. Angular is quite a bit heavier, but man ... it is a joy to work with.
|
# ? Sep 24, 2013 21:15 |
|
JediGandalf posted:I'm already designing a pretty client-driven SPA application that uses ASP.NET MVC. I'm still building the models of the server side so I haven't gotten to anything client or view related. That's the very last thing I do. But I want to know which client framework would probably be best with ASP.NET MVC. Apparently Knockout is included with ASP.NET MVC. Anyone have any opinions on that? If you want to stick with knockout, try Durandal. http://durandaljs.com/ It's a MVVM view composition framework built with knockout. Otherwise, Angular is a fine choice too. Or ember. Or one of the million other front end spa frameworks. I'd also recommend checking out BreezeJS. It provides a client-side data layer, and if you're using the microsoft-happy path, ties in smoothly with Entity Framework.
|
# ? Sep 24, 2013 21:24 |
|
Can one of you skinny jeaned guys chime with why the Yahoo redesign is so terrible? On my Nexus 4/Nexus 7 it takes over a minute to render the mobile version (showing FOUC the entire time).
|
# ? Sep 24, 2013 21:45 |
|
Speaking of front end devs, we are hiring one in DC. PM me for details.
|
# ? Sep 24, 2013 21:53 |
|
Scaramouche posted:Can one of you skinny jeaned guys chime with why the Yahoo redesign is so terrible? On my Nexus 4/Nexus 7 it takes over a minute to render the mobile version (showing FOUC the entire time). mobile.yahoo.com seems to be pretty fast, actually. The new slate site, on the other hand is a buggy, ugly shithole. I'm a fat man in stretch pants, though, so I probably don't know what's going on. I'm glad this thread is around but it seems like it could get hard to navigate pretty fast. Maybe we should tag posts that are about a specific framework with a /angular or /ember at the top just so it can be easier to jump/skip through them. On the topic of Meteor, a lot of people got really silly about INSECURE BY DESIGN when it was first announced. Obviously they're not going into release with a framework that freaking dumps your whole database to every single client that ever connects. It's silly to even assume that anyone would plan to do that. This screencast explains how Meteor does authentication at the moment. The vision they have for the platform looks amazingly sexy and full stack reactivity is mind-blowing(changes in the database automatically push to all clients connected to it, if they're authorized to see those records). As far as I can tell if Ember+<some persistence layer+a server> and Meteor are pretty close in their final objectives. Ember itself seems to be more polished than the Meteor front-end stuff and Meteor's MongoDB integration seems better than Ember Data. But EmberJS can just use a Rails backend, which is what Discourse does. I'm just beginning to learn about Ember and Meteor, so I'll definitely be keeping an eye on this thread. Goons that have experience with any of these frameworks in production: What types of sites do you use them for? What's your production stack look like? Workflow? Testing tools?
|
# ? Sep 24, 2013 23:17 |
rhag posted:I just struggled with knockoutjs for a week. My data model was a bit complex, and it was a pain to get everything observable. After a while I went to the mapping plugin but it made everything worse. Then I used the viewmodel plugin, and while that was somewhat better, certain properties were not observable sometimes (and I was never able to figure out why). Knockout can be kinda weird at first until you get that your observable objects need their elements to also be observable recursively. Then it becomes easy.
|
|
# ? Sep 25, 2013 00:15 |
|
Sil posted:Obviously they're not going into release with a framework that freaking dumps your whole database to every single client that ever connects. It's silly to even assume that anyone would plan to do that. I want to come live in your universe. It sounds nice.
|
# ? Sep 25, 2013 01:46 |
Yeah meteor only dumps the database in like the first 3 minutes of developing an app. then you turn off that feature and selectively publish data on demand.
|
|
# ? Sep 25, 2013 01:56 |
|
Thanks for this thread, abraham linksys. I wrote my first SPA last week w/ angular and as I learned a bit about angular, less/sass, bootstrap, etc. I was thinking that there had to be a toolset for integrating everything into a build and that maybe it would even have unit tests for my javascript. Then I found your link to yeoman and it was exactly what I wanted. I even appreciated the hundred or so style errors grunt spit out at me since I don't know anything about standard js style. I managed to get my app up and running within the yeoman workflow tonight. Tomorrow I'll start writing some unit tests and adjust my gh-pages branch to work off a subtree based on the dist folder, as per https://github.com/yeoman/yeoman/wiki/Deployment. Oh, and about angular. I am not much of a web dev but I've played w/ jQuery and a backend that served json before and I have to say that angular is an absolute joy to work with compared to the stuff I was doing with jQuery. In fact, angular and html/css is nicer than any gui frameworks I've worked with in java or python.
|
# ? Sep 25, 2013 04:30 |
|
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 |
# ? Sep 25, 2013 07:29 |
|
The Insect Court posted: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. Any npm package can be used with Meteor, it just needs to be wrapped in a Meteor package(which just means require it and add some extra configuration stuff Meteor needs). Their roadmap to 1.0 and beyond looks pretty cool. The platform is opinionated because they wanted people to be able to build stuff with it. The main concern I have is the low focus on testing and the possibility that it might never actually be fast enough. I get a Google Wave sort of feel from Meteor. Super exciting, but maybe well ahead of its time. That being said they have years to get this stuff done properly. Whether they succeed or not, I think they'll push the industry in the right direction. They're stance on things like authentication is particularly refreshing. No, their default one line FB/Google/Whatever auth system isn't going to work for everyone. But they're treating user account management as a basic responsibility of the framework, which I think is a step forward from Rails(which itself has a pretty hassle free authentication/roles setup, once you're familiar with 3-4 gems).
|
# ? Sep 25, 2013 12:01 |
Okay can someone actually explain wtf an HTML directive is in Angular? Their docs say cryptic things like "Turn your markup into a DSL!" but I still don't understand, even after looking at the examples.
|
|
# ? Sep 25, 2013 14:34 |
|
HTML directives are the extra tags/attributes that angular provides. Stuff like ng-model and ng-change are directives. You can extend angular by writing your own directives. E.g. angular-bootstrap has directives that provide a ton of controls such as the accordion, accessible with the <accordion> tag. The directive documentation has an example of writing your own directive partway down the page in the section titled "Writing directives (short version)". The directive written in the example is "my-current-time".
|
# ? Sep 25, 2013 15:39 |
|
A MIRACLE posted:Okay can someone actually explain wtf an HTML directive is in Angular? Their docs say cryptic things like "Turn your markup into a DSL!" but I still don't understand, even after looking at the examples. As I understand it, the directives essentially allow you to create new HTML tags, new tag attributes or simply give a new meaning (and behaviour) to existing tags (such as for example the "a" tag when it has a href="" angular will prevent the browser from doing anything when the link is clicked. You have to provide your ng-click implementation.). The advantage is that the directives can do anything you want(change the DOM, load data, save data ... anything is possible) but the HTML markup code remains relatively clean and easy to read. For example: code:
code:
And jquery is even worse in my opinion. You have to manually create the DOM nodes in javascript, often the simplest way is to just write the HTML with innerHTML or some function like that. And then you're mixing view with logic with data.
|
# ? Sep 25, 2013 17:49 |
Thanks for the writeups guys. I guess there was a disconnect where I didn't understand that it was basically "making your own tags"
|
|
# ? Sep 25, 2013 18:44 |
|
A MIRACLE posted:Thanks for the writeups guys. I guess there was a disconnect where I didn't understand that it was basically "making your own tags" ...and/or attributes. Plus, all of the angular tags and attributes that you are already using are directives.
|
# ? Sep 25, 2013 18:58 |
|
Both Meteor and Ember seem very interesting. I'm very interested in the database integration offered by Meteor, since it is starting to feel clunky to use PHP or another language to handle DB connections and queries. Yeah, you can use AJAX and echo the data as JSON, but I'm noticing that the more jQuery that I use, the more the PHP layer just feels like it is in the way. When I was learning jQuery, PHP Academy/the New Boston had some very helpful videos that walked me through learning the language at a very fundamental level. Is there anything similar, even if it's behind a pay wall, for Ember or Meteor? I know that Ember's guides feel like they skip a bunch of steps just so they can quickly have you "write" a cool application and I've only just started looking into Meteor, though their videos almost completely glossed over the code just so they could show off the capabilities of Meteor.
|
# ? Sep 25, 2013 19:59 |
|
Aniki posted:Both Meteor and Ember seem very interesting. I'm very interested in the database integration offered by Meteor, since it is starting to feel clunky to use PHP or another language to handle DB connections and queries. Yeah, you can use AJAX and echo the data as JSON, but I'm noticing that the more jQuery that I use, the more the PHP layer just feels like it is in the way. 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.
|
# ? Sep 25, 2013 20:07 |
|
First page guys.Knyteguy posted:Currently tutsplus.com ($20/mo) has a few good tutorials for this new style of web development. I'm running one on their site that basically teaches you how to create a whole analytics app with graphs and other cool elements with Ember.js using MongoDB, require, and a bunch of other stuff. It's been an extremely helpful place to get started after watching the old EmberJS video tutorial on the Ember site. The books on these subjects are obsolete almost before they're published. The tutorials are far from perfect, but I've found that site to be a great resource to get my feet wet along with Ember's docs on their sites. Be sure to check them out before throwing any money down (seriously watch the first two videos if a certain lesson plan piques your interest): Ember: https://tutsplus.com/?s=ember&post_type=all https://tutsplus.com/course/end-to-end-analytics/ https://tutsplus.com/course/hands-on-emberjs/ https://tutsplus.com/course/ember-for-beginners/ Meteor https://tutsplus.com/course/building-single-page-web-application-with-meteor-js/ They probably have more but that was a quick initial search. The developers blow through the content pretty quickly because they copy+paste code sometimes, so it's important to be ready to pause so you can copy the code down. Alternatively you can download the source code and just follow along instead it that's how you prefer to learn.
|
# ? Sep 25, 2013 21:29 |
|
Knyteguy posted:First page guys. Thanks, I missed that. Edit: These videos seem like they're going to be helpful. Aniki fucked around with this message at 00:27 on Sep 26, 2013 |
# ? Sep 26, 2013 00:17 |
|
Aniki posted:Thanks, I missed that. They're OK (especially for the money), but they'll throw curveballs at you that make it difficult to follow sometimes. Barring all of that I still feel they're worth it.
|
# ? Sep 26, 2013 01:05 |
|
So we're in the process of re-writing one of our old applications. It's an interaction-heavy data-centric application that another company has built their business off of. We've done a lot of the backend work but have only built a little bit of the front-end. I've convinced my boss and the other developers on the project that using an SPA framework will be the way to go, and we've settled on Ember. I'm kind of excited, but I can't shake the feeling that this is gonna bite me in the rear end some months down the road.
|
# ? Sep 26, 2013 01:46 |
|
Tutsplus is an invaluable resource that I wholeheartedly recommend. It has so many great tutorials.
|
# ? Sep 26, 2013 04:05 |
|
Winter is Cuming posted:Tutsplus is an invaluable resource that I wholeheartedly recommend. It has so many great tutorials. http://net.tutsplus.com/tutorials/php/aspect-oriented-programming-in-php/
|
# ? Sep 26, 2013 04:34 |
|
Tutsplus posted an entire Ember course for free. No idea what the quality is like, but it might be worth watching: http://freecourses.tutsplus.com/lets-learn-ember/index.html
|
# ? Sep 26, 2013 21:37 |
|
fidel sarcastro posted:Tutsplus posted an entire Ember course for free. No idea what the quality is like, but it might be worth watching: Nice, I'll definitely take a look at this. I think Ember is going to me more useful for me in the short term. Meteor seems really interesting and I like the idea of being able to interact with a database on the JS level, but I'm not sure what to think about NoSql databases like Mongo DB yet. It's interesting and I'm sure that I could get my head around the BSON/JSON structured queries, but I do a lot of multiple table queries and joins, so it probably wouldn't be a good fit for the main project that I'm working on. It may work well for some other projects I'm looking into though, so I may try it out on some smaller projects. It looks like there are ways that you can work around the lack of joins, but they don't seem ideal, though that article is from 2011, so it could be out of date now. Mongo does have a nice reference showing the equivalents between SQL and Mongo. They list embedded documents and linking as the equivalent of joins, so I'll need to look into those. I'm sure there are ways to write complex queries in Mongo, it's just a question for me on whether it's worth figuring out if I'm already comfortable with SQL.
|
# ? Sep 26, 2013 22:14 |
|
fidel sarcastro posted:Tutsplus posted an entire Ember course for free. No idea what the quality is like, but it might be worth watching: I will say that all of the Ember tutorials, screencasts, and books I've seen don't touch on asset compilation/build tools, which are hugely important for Ember. It'd be like trying to teach Rails without using the rails command. If you're interested in Ember, you should look into Ember-Rails, Yeoman's Ember generator, and/or Ember App Kit. Aniki posted:I'm not sure what to think about NoSql databases like Mongo DB yet. FWIW, using a front-end framework (except for something full-stack like Meteor) doesn't require you to go NoSQL! In fact, Ember Data is built specifically to interact with a RESTful API backed by a relational database, and sort of sucks right now with Mongo
|
# ? Sep 26, 2013 22:39 |
|
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.
|
# ? Sep 27, 2013 02:36 |
|
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. 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 |
# ? Sep 27, 2013 04:23 |
|
The Insect Court posted: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. I think he was referring to the 2-layer part. NoSQL 4 life.
|
# ? Sep 27, 2013 04:36 |
|
From what I understood from the mongo course you pretty much just don't ever do joins in mongo. You put all your data in a document (json object) and if you have sub-data it goes in a sub document. The idea is to optimize your document design so that you can pull out one document and have everything you need for the thing you most often do with that document. E.g. A blog post w/ author and tags and content all in the same document as opposed to having different tables linking those items and querying for the full blog post. If you need to do something like search by tag you totally can, mongo lets you create indexes at any level of the document. The only real limit on documents is that they are 15mb max. If your documents will exceed 15mb you'll have to create two collections and join between them yourself. To really feel the benefits of mongo's scalability and sharding you'll want to keep all of your data in one big document. Anyway, not sure why you're looking at mongo but I hope this helps you realize what it's intended to do. If you have a big database with lots and lots of interlinked queries then you will probably want to stay relational. If you want scalability and can pretty easily chunk stuff out into a few collections of documents that fit with the queries you need maybe give mongo a shot.
|
# ? Sep 27, 2013 06:43 |
|
I like the idea of being able to take the same data set and use different views to display tables and/or graphs and then automatically update those views as new records are created and records are updated. It's something that could be used to put together some really cool real time reports, though admittedly it's in the category for me where it is cool that it can be done without too much difficulty, but it probably doesn't offer much practical advantages over sending an AJAX request every 60 seconds to few minutes. In my case, I'm in the process of writing web based call center software, which relies heavily on a relational database, so Ember Data is likely a better fit for what I'd like to do, though my understanding is that it's not ready for prime time at this point. I'm hoping to go through some of the Ember videos this weekend and maybe start messing around with Ember Data and a test database to see if it's something that is feasible to use for reporting. It's not necessary, it's just something I'd like to experiment with. The Insect Court posted: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? I think what he's referring to is no longer needing to use PHP/ASP/C#/etc to handle to getting the data from the database. You could handle all of that with JS, so the step of using another language to access the database would no longer be necessary. Aniki fucked around with this message at 11:58 on Sep 27, 2013 |
# ? Sep 27, 2013 11:48 |
|
The Insect Court posted: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. Bingo. I'm personally a big fan of NoSql solutions. RavenDb is my default choice for most projects. The Insect Court posted: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? Having your client app talking directly to the database is pretty two-layer. Now, I'm probably too grizzled and old here but I really can't trust javascript to execute my validation and security logic since it is executing on the client and is easily subvertable. Exposing the data layer (mongodb) directly to client submissions is a bit scary. I'm also old enough to remember the fun days of classic ASP and stored procs OR better yet PHP3 and mysql queries every other line. Those aren't days to go back to. quote:I think what he's referring to is no longer needing to use PHP/ASP/C#/etc to handle to getting the data from the database. You could handle all of that with JS, so the step of using another language to access the database would no longer be necessary. Certainly not -- I think these newer SPA-style frameworks need that middle tier more than ever. Now, the nice part is we can go back to writing very clean middle tiers that take data in and spit data out and can render unto the browser what is the browser's so to speak. But I wouldn't dream for a minute of having my js-based app hitting a document DB directly outside of something that is purely read-only and then seeing indexes which you can perhaps argue are an effective read-only middle tier in and of themselves.
|
# ? Sep 27, 2013 16:37 |
|
Considering all this chat about offline storage I may as well bring up a indexedDB/webSQL wrapper that I'm writing for an application I'm working on. I intend to make it 100% offline capable, plugging into an existing Django application I've made (http://spanner-pms.com) so I can make an all new front end. The library is called JohoDB, find it here http://malucomarinero.bitbucket.org/johodb/ I've had really good experiences with it so far, integrating it into Angular cleanly. Still lots to do like data migration, generic relations and a bunch of other things, but I'm pretty happy with how its progressing, at least for my own use case.
|
# ? Sep 28, 2013 09:11 |
|
I really love Meteor, so I set up a quick Vagrant provisioning file for anyone on windows / doesn't want to mess with getting it set up with Meteorite etc: http://adnissen.github.io/vagrant-meteor
|
# ? Sep 30, 2013 01:48 |
|
I'm trying to stay current on this stuff, even though I can't really use it right now. I'm in the middle of an ERP implementation project that will take 3 years, and I want to come out of that crap swinging. What sites/blogs should I follow to do so?
|
# ? Sep 30, 2013 14:01 |
|
Found this page which has a rather large and seemingly up to date collection of resources for Meteor: Yet Another Useless Homepage - Best Learning Resources for Meteor.js
|
# ? Oct 1, 2013 01:22 |
|
|
# ? Apr 19, 2024 07:56 |
|
Dietrich posted:I'm trying to stay current on this stuff, even though I can't really use it right now. I'm in the middle of an ERP implementation project that will take 3 years, and I want to come out of that crap swinging. I second this question -- would love to know who is worth reading and who is a skinny jeans wearing handlebar mustache having hipter who should stick to riding fixies. For a .NET guy, K. Scott Allen has dived into angular hard and is doing a great series of posts on working with it (and .NET back ends) at http://odetocode.com/blogs/all
|
# ? Oct 1, 2013 14:08 |