Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I would like to create a quiz with dart. Checkboxes, radiobuttons, dropdownmenu, inputfields, ...
Furthermore I would like to load the quiz from a database, display it on a website and store also the results of a specific user to a database. Redis or mysql.
The big question for me: Should I use polymer.dart or angular.dart? Both are capeable of doing it but what would be the obvious choice?
Polymer and Angular might look very similar because they both have templating and data-binding, but they're actually quite different.
Polymer isn't really a full application framework so much as it is a framework for creating W3C Custom Elements1. It relies on new, upcoming, and hopeful standards like Shadow DOM, Object.observe, Mutation Observers, Scoped CSS, the element, Template Binding, Node.bind(), Custom Elements and HTML Imports and basically makes it easier to use them together to create custom elements. You actually don't need to use Polymer at all to create custom elements, it would just be more tedious. The Polymer project has also built polyfills for those standards, so it's sometimes confusing to tell which parts are the actual "polymer" part. In Dart-land it's only things in the polymer package, mostly the Polymer class, everything else is in packages like observe, template_binding, or already integrated into dart:html, like Shadow DOM.
Once you implement a custom element in Polymer, users of the element don't need to be aware of Polymer at all, it's an implementation detail. They might need to know about custom element upgrading or Node.bind(), but not Polymer. In fact, Polymer is so focused on elements, that there isn't really such a thing as a "Polymer app", there's just an app built out of custom elements, which happen to be implemented with Polymer, but they could just as easily be implemented with Mozilla's X-Tags library[2]
Angular is definitely more full featured and what I would call an "application framework", rather than a custom element framework. It provides directives (mixin behaviors for nodes), dependency injection, all kinds of services like http and routing, and has this whole mutable inherited scope idea that permeates the app, and has global state, among other things I'm probably missing. Angular currently won't help you build custom elements, instead you create Angular components that work in Angular apps.
An Angular app can use Polymer elements, since Polymer elements are just elements. One way data-binding should[3] just work, while two-way data binding will require either a custom directive (to use Object.observe or Node.bind to listen to property changes), or for Angular to add support for Node.bind(), which would allow Angular to generically two-way-bind to any element, from s to Polymer elements, to X-Tag elements.
In the end, I don't think there is a fair apples-to-apple comparison between the two, and the overlap is smaller that it might appear on the surface, because people seem to either over-estimate how big Polymer is or how under-estimate how big Angular is, or maybe they aren't aware of the differences in philosophy. I fully expect more Angular-like frameworks to appear in the future that build on top of custom elements that will be more comparable to Angular than Polymer is, and Polymer will still be a nice way, among other options, to implement the elements.
SOURCE
I worked a lot with Polymer (https://github.com/ErikGrimes/polymer_elements, https://github.com/ErikGrimes/polymer_ui_elements) and worked on a webapp based on Polymer.
I like building apps out of components a lot.
Recently I immersed into AngularDart.
Angular allows to create components too.
At the current state I would say that I find Angular more lightweight.
Not everything has to be a component, there are more lightweight constructs (direcitve, controller)
The hierarchical scope easily allows to connect everything.
I have yet to do more advanced things (like I already did with Polymer) to learn the limitations of Angular and be able to do a fair comparsion.
Both have still some glitches and limitations and are still pre 1.0
but both already allow building advanced applications
and as #Nidzaaa 's noted, they can be used in combination.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I will start a new .Net MVC project with a small team. It have five members, two back-end devs and three front-end devs.
The front-end members will work separately, building a html version of this project using tools like gulp/grunt, less/saas, jade and others frameworks. They prefer to use editors like Sublime and will run interface tests in many differents devices in real time.
They not able to work with MVC specifically Razor view engine, so we need two repositories, one to front and another to back.The back-end developer in the process ever need to catch the built html and suit it in Razor MVC.
Any ideas how to improve this process? How can i reduce the technical gap between back devs and front devs?
IMO you are trying too hard to accommodate the skills/desires of your team members. You will not get good cohesion from the client side with the server side if you completely ignore Razor/CSHTML. Your overall architecture/design should come first, and dictate these decisions. Of course you would take your team's skills into consideration, such that you wouldn't make a team of Java developers adopt C++. But you are taking this to an extreme by basically throwing consideration for design/architecture out of the window, and saying you will divide the application based on what your devs are willing to work with.
My opinions aside, you can make this work, but somewhat painfully.
For one, developing HTML apges first in a vacuum without consideration for interactions with the server is either going to result in very crippled interface that is more like static website from the 90s. There are a few cases where you can build a single-page-application that's pure javascript with no AJAX requests, but these scenarios are very rare.
Therefore, you need to either build the server-side first, or have a design step that mocks up the page and talk through how it will work.
1) Design a page and it's features, and how it interacts with the server. Identify what interactions are navigation actions, such as clicking a link to navigate to another page, versus those which are AJAX operations. Do NOT implement HTML, that comes later. As a team review what each dev mocks up and make sure they've thought through all of the interactions thoroughly.
From this, list what server side operations are needed in the controller for that page:
agree upon URLs
is it GET/POST
is it AJAX
whether it returns a page, partial HTML fragment, or JSON.
what parameter names for each are and data types
2) Your backend developers create controllers, exposing actions based on agreed upon design. CSHTML will for now be stubs and return nothing.
3) Your frontend developers create HTML/javascript to consume these.
They will be able to point ajax operations to the controllers, but they will need to mock what is returned since the Controllers don't know what HTML they should be returning yet.
4) Front end devs provide HTML to back end devs to incorporate into the project so that actions/partial views return the HTML or HTML fragments.
The problem is you are going to constantly be iterating through frontend devs giving HTML to backend devs to incorporate into the MVC project so that the actions that return HTML and or AJAX actions that return partial HTML fragments (PartialView) can be tested.
It makes for a very non-agile process.
You won't be able to take advantage of many frameworks for MVC which assume you are using Razor views/HTML helpers. Many frameworks for compressing/bundling javascript/less/css which integrate well with MVC are not going to be viable. You can still do this stuff, but you'll have a workflow that is not as smooth and will involve more hacking it together yourself.
I would like to point out that almost all javascript frameworks work great within CSHTML. From the client side perspective, MVC/CSHTML doesn't introduce any strangeness that prevents you from building very interactive pages. You can build a CSHTML page that is pure HTML and javascript, and makes AJAX calls to controllers, but trying to take that outside of the MVC project is going to cripple the development workflow. Designing and implementing an interactive page requires alot of consideration for how the actions on the server side are implemented.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am new to angularJS and I went thru this tutorial on it but did not find anything pertaining to how to create or handle UI elements like modal windows, date controls, file upload with progress bar, input validation, etc. What I've understood from this is that Angular was not originally made for UI like bootstrap is, but only for handling data from the server. After that I still have to inject other jquery controls for all the stuff I mentioned above using either bootstrap or similar other third party jQuery controls and make everything work together.
After a little digging around I found this. Now I am confused as to which way to go about learning angular and following best practices for development using angular. Any guides that you can recommend? I intend to have my next project which is an online photo library driven entirely by angular on the client side with MVC on the server side.
More specifically I'd be interested in knowing how much of the following I can do purely with Angular along with some documentation explaining how its done and which of these I will need to rely on other controls or plain jQuery along with some documentation on how everything plays together:
Handling exceptions thrown by services on the client side using Angular
Using UI controls like modal popups, Grids, date controls, file upload controls (large files) with progress bar
Validation of user input on the page.
Thanks for your time.
Let me try to addess your concerns
Handling exceptions thrown by services on the client side using
Angular
This can be handled case by case basic or at a global level by using response interceptors. See these examples
http://www.webdeveasy.com/interceptors-in-angularjs-and-useful-examples/ and
https://medium.com/opinionated-angularjs/techniques-for-authentication-in-angularjs-applications-7bbf0346acec which shows how you can interceptors are used to catch 401, 403 errors from server.
Using UI controls like modal popups, Grids, date controls, file upload
controls (large files) with progress bar
As you have pointed out ui-bootstrap is one library that provides a decent set of elements that can be used for your project, written in Angular. Since the framework is very popular now there are angularjs ports for almost everything that is available in jquery. If not you can roll out your own directives for UI elements.
Validation of user input on the page.
AngularJS form validation provides a decent set of primitives that can help you implement validations. Developers around have also written their own directives which extend the default validations such as
https://github.com/huei90/angular-validation
https://github.com/kelp404/angular-validator
https://github.com/nelsonomuto/angular-ui-form-validation
http://angular-ui.github.io/ui-utils/
http://blog.technovert.com/2014/03/angularjs-form-validation-library-directives/
Basically, there's no limit to what you can do with AngularJS. There's just a learning curve.
The framework is somewhat confusing at first, but you'll quickly catch up.
Angular-UI is good, learn to use it. I almost never use jQuery.
For starters, I'd recommend building a basic CRUD UI which would hit a RESTful API. Why RESTful? AngularJS plays nicely with these thanks to the $resource factory.
You can then check out how to manage errors from http response. You could then polish your skills and avoid some errors with some client-side validations.
A few more things to check out :
http://ruoyusun.com/2013/05/25/things-i-wish-i-were-told-about-angular-js.html
egghead tutorials
thinkster tutorials
And of course, StackOverflow is a wonderful resource about
angularJS!
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Has anyone integrated meteor with mobile front-end frameworks?
In making mobile html5 apps look "more native" there are a number of CSS/front-end frameworks. eg:
Meteoric http://meteoric.github.io/
http://onsenui.io/
http://topcoat.io/
http://jquerymobile.com/ (shudder)
http://goratchet.com/one.html
http://ionicframework.com/
App.js: http://code.kik.com/app/2/index.html
http://lungo.tapquo.com/
http://famo.us/
http://goratchet.com/
http://www.idangero.us/framework7/
Foundation for apps
and more. In comparison to plain Bootstrap, the main benefits are:
preloading content
smooth full-screen page navigation
mobile widgets with "native look" for ios/android
But these frameworks often have use their own MVC model, for example pre-loading content into offscreen DIVs and doing full-screen transitions. they often use an internal router or Pushstate which would conflict with Meteor/IronRouter. And ionic for example depends on angular...
Has anyone had success with this type of integration? Any leads appreciated.
Meteoric
http://meteoric.github.io/
is a port of ionic, to remove the Angular stuff, and make some UI parts reactive. EDIT: not being updated now that angular is an option to jam into meteor itself.
related article:
https://medium.com/space-camp/cross-platform-uis-for-mobile-meteor-apps-6f12b583b205
this does seem like a great solution for mobile, but won't help if you want one UI to be responsive across to desktop devices too. they have deliberately kept the grid simple and mobile focused.
As I understand, you are interested in any cases of mobile front-end framework integration with meteor.
Let me show you great example famo.us + meteor from Percolate Studio - guys who are doing a lot of stuff with meteor and for meteor too. Here announce in meteor blog, also video from devshop
Some useful links in blog and devshop will be a good example of successful mobile+meteor integration in production app.
Ratchet is available as an atmosphere package. It does not include all the javascript parts of the framework but very handy nonetheless.
meteor-ionic
It uses the ionic
Bootcards is very good choice it's not meteor package yet .
Ratchet is lightweight but also good choice .
another new contender is Materialize which is a CSS/JS version of the material design elements, ie no angular required:
https://github.com/Dogfalo/materialize
here's a blog on some of the basics
http://blog.differential.com/the-easy-way-to-add-material-design-to-your-meteor-app/
pros
Materialize seems to have a decent set of widgets, and nice animations.
cons
pure android look, don't expect any appstore feature love
no full-page transitions out of the box, like meteoric
From the general goal sense, the front end part of Meteor somewhat conflicts with Angularjs. However, nothing is impossible if you really want to make them together. To accommodate them together, you need to do some special tricks. This following post shared the experience to make them working together.
mrt:ionic is the package by integrating meteor and ionic together. But it does not support the latest meteor version. You'd better wait for some time for the update.
Foundation for Apps from Zurb is another option, but it's built on Angular so would have to be ported/hacked about in the same way the Ionic project was.
http://foundation.zurb.com/apps/
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I am working in Asp.net MVC for last 1 year but I have never used AngularJs , BackboneJs or KnockoutJs . Now I want to use it in my project but I am little bit confuse that for MVC which is one is Best . Somewhere I read that AngularJs has best perfomance but mostly used with MVVM framework so kindly provide me proper guidance that with Asp.net MVC which js is best either AngularJs or BackboneJs or KnockoutJs ?
Thanks in Advance.
If you are building single page application you need a SPA framework. It should include two-way data-binding, client-side routing, page composition, navigation, screen state management, module system, bundling. You can choose between Angular and Durandal. They both provide very similar functionality, but in my opinion, Durandal is the most complete SPA framework, which is very easy to use. Both Durandal and Angular can be used with Breezejs to build data centric applications.
check Durandal, Durandal Auth and HotTowel Angular
If you are building ASP.NET MVC application, then all you need on the client side is two-way data binding to reduce DOM manipulations. In my opionion, it's an overkill to use angular just for data-binding. Backbone or Knockout are good choices, but Angular can be used as well.
It depends on the nature of your application. And since you did not
describe it in great detail, it is an impossible question to answer. I
find Backbone to be the easiest, but I work in Angular all day.
Performance is more up to the coder than the framework, in my opinion.
Are you doing heavy DOM manipulation? I would use jquery and backbone
Very data driven app? Angular with it's nice data binding
Game programming? none, direct to canvas, maybe a game engine - Source
Also, take a look at https://stackoverflow.com/questions/5112899/knockout-js-vs-backbone-js
You can check the following source. It's really complete:
http://www.infoq.com/research/top-javascript-mvc-frameworks
Personally, I'd go for Angular just because of its performance, but there are plenty of reasons...
I'm using Knockout with ASP.NET MVC/Web API at work, but I have played with Angular at home and honestly prefer that. Bear in mind though that Knockout solves a much smaller problem than does Angular, the latter being a complete SPA framework (with services, HTML directives etc). To compare apples to apples, you should consider Knockout in tandem with Durandal, as this is a full-blown SPA framework like Angular.
From practical experience I suspect that memory leaks are easier to avoid with Angular than Knockout, since Knockout produces references implicitly as you subscribe to observables (typically via ko.computed) and we had a very hard time trying to track down such memory leaks due to undiciplined taking of Knockout subscriptions without cleaning up. With Angular I couldn't see that you have the same problem, as you don't subscribe directly to mutating variables ("observables"). Instead, the framework is in full control of applying model changes, which might be harder to grasp initially, but ultimately leads to better maintainability.
I have not tried knockout or backbone. With Angular I have worked with ASP.NET MVC. I personally did not like using MVC views. As Angular requires POJO (Plain Old JavaScript Objects) , So, I changed to Web Api and Angular. To be honest I am very satisfied with Angular because of following reasons:
DOM maniuplations are done where they belong.
Two way binding
Designed with unit testing
Services are where they belong
Designed with HTML5 in mind
Ability to create HTML markup to suit business needs (directives) and many more.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I'm wondering if someone can give some advice as to which is 'better'. Twitter-bootstrap or JQuery mobile?
Thanks,
-peter
I don't know if "better" is something you can answer since they serve different purposes. Bootstrap is great all-purpose CSS library whereas jQueryMobile is closer to a framework. Meaning jQueryMobile doesn't just make your pages look nice- it gives a lot of mobile oriented features such as- swipe-events, page transitions, allows for single page applications (since it will only show a single div with data-role='page' at a time), AJAX preload and history API, and lots of touch friendly components/widgets. Whereas bootstrap is foremost a CSS library mostly for desktop but works on mobile as well especially since 2.0 comes with media queries built in. Bootstrap will not help you with touch friendly lists, checkboxes, select menu's, etc.
One more thing to point out, jQueryMobile takes your markup and dresses it with all sorts of pretty stuff using JavaScript. Bootstrap has some javascript, but only for optional components, the rest is CSS.
So to answer IMHO- if you're a making a web application that you explicitly plan on using primarily on mobile devices go with jQueryMobile; Anything else go with Bootstrap- it's really quite awesome.
jQuery mobile != twitter bootstrap. Twitter bootstrap is used to create responsive layouts [a single CSS can work on big as well as small screen size]. jQuery mobile is intended for mobile development. So if you develop a site using jQuery mobile won't give a good layout consistency in all desktop browsers.
While I agree that Twitter Bootstrap != jQuery Mobile, you can develop mobile sites with Bootstrap. After spending the last couple months developing a mobile site using jQuery Mobile, my conclusion is this:
The concept behind jQuery Mobile is perfect. The "page" concept integrates very well with server side technologies (ASP.Net MVC in my case). It allows you to develop pages as individual files, rendered mostly on the server, as you're already used to doing and probably desire to do.
However, in its current state, it can get very slow and very buggy if you try to do too much with it. I've run into problem after problem with it on my project.
So I'd say, if your site isn't too complicated (e.g. no swiping, no wizards), then go with jQuery Mobile. Otherwise, think about waiting for the project to mature. It's almost there.
I think the main differences are apparent by how the two projects identify themselves:
Bootstrap:
"Sleek, intuitive, and powerful front-end framework for faster and easier web development."
jQuery Mobile:
"Touch-Optimized Web Framework for Smartphones & Tablets."
Both frameworks are aiming at meeting different needs and accomplishing different things. I've used both of them in separate projects and each of them have strengths and weaknesses, but it would be a disservice to both to directly compare them. It's our job as programmers/designers/engineers to decide the goal for your project and pick the best tool for the job.
It depends on what you are going to do with it. I prefer Bootstrap in most cases, because i like the base css plus you can compile with responsive.less so you got a mobile version too. Iam much faster when prototyping with bootstrap because it is very loose coupled and just plain markup (except for the plugins, those are great too).