Angular 2 first impression
-
@lucas1 said in Angular 2 first impression:
Angular 2 seems well thought out, the typescript stuff and default project template just works out of the box.
How does it actually perform?
-
@lucas1 I am not trolling, I am being serious. If you want something like ASP.NET Web Forms, then just USE ASP.NET Web Forms.
And You managed to summon Blakey here on this now, so imma bow out and let him argue it now ;)
-
Everything in that clause is untrue. ViewState (and PostBack) are merely configuration that can be turned-off. WebForms is entirely capable of serving up fully-materialized templates to AJAX requests.
Yes I am aware it can be done and they have improved things since .NET 1.1 / 2.0 days.
Except the last bit about using generic handlers which is kind of gibberish. "You can write a good WebForms SPA if you don't use WebForms at all"-- huh?
You can use an ASPX page to bootstrap the page and then configure generic handlers / .ashx etc. to work from there on afterwards.
TBH I do all this stuff with OWIN these days which is much lighter and make more sense to me.
-
@Yamikuronue said in Angular 2 first impression:
@ufmace said in Angular 2 first impression:
Naturally, I set everything up like the example, and the Link element works, but when I click the link, the URL bar changes, but it doesn't show the element that the related Route tag says.
This sentence exemplifies everything that's wrong with modern web dev.
Eh, they all have some quirks, but it doesn't seem worse than WPF or WinForms to me.
-
If you want something like ASP.NET Web Forms, then just USE ASP.NET Web Forms.
I never said I wanted ASP.NET Webforms. I said the structure of the application which is in JS resembles something like ASP.NET Webforms in structure.
EDIT: The application is written in TS (TypeScript).
-
@ufmace said in Angular 2 first impression:
it doesn't seem worse than WPF or WinForms to me.
Re-inventing HTML but buggier doesn't sound worse? Huh.
-
Most people I have spoken to that have experience with Silverlight and WPF have said it is pretty solid.
-
@lucas1 Silverlight was amazing, especially compared to the Flash ActionScript 2.x it was competing with.
I don't think Microsoft expected Adobe to get their shit together and move to ActionScript 3 so quickly. AS3 was a huge leap and really narrowed the gap between Flash and Silverlight.
-
@lucas1 said in Angular 2 first impression:
If you want something like ASP.NET Web Forms, then just USE ASP.NET Web Forms.
I never said I wanted ASP.NET Webforms. I said the structure of the application which is in JS resembles something like ASP.NET Webforms in structure.
You are correct, but my interpretation was funnier
-
@RaceProUK said in Angular 2 first impression:
@ufmace said in Angular 2 first impression:
Naturally, I set everything up like the example, and the Link element works, but when I click the link, the URL bar changes, but it doesn't show the element that the related Route tag says.
And that's why I don't use client-side MVC frameworks. That, and they're massive overkill for what I need to do; jQuery is easily enough for my needs.
If that's actually what you're using JQuery for, then fine, but I've seen some pretty cringe-worth monstrosities built with JQuery. If you're gonna write some huge thing with multiple dynamically-loaded pages and form validations and AJAX behavior, then for God's sake use Angular instead of creating yet another half-assed homemade "framework".
-
@Yamikuronue said in Angular 2 first impression:
@ufmace said in Angular 2 first impression:
it doesn't seem worse than WPF or WinForms to me.
Re-inventing HTML but buggier doesn't sound worse? Huh.
Eh, I've worked on apps in WinForms, WPF, and Angular 1.x for months/years. They all have some quirks, but I don't see any of them as overall worse/buggier, besides the limitations of web apps.
-
@ufmace said in Angular 2 first impression:
If you're gonna write some huge thing with multiple dynamically-loaded pages and form validations and AJAX behavior, then for God's sake use Angular instead of creating yet another half-assed homemade "framework".
What makes you think I'm creating a homebuilt framework? I'm doing all my MVC server-side.
-
@RaceProUK said in Angular 2 first impression:
@ufmace said in Angular 2 first impression:
If you're gonna write some huge thing with multiple dynamically-loaded pages and form validations and AJAX behavior, then for God's sake use Angular instead of creating yet another half-assed homemade "framework".
What makes you think I'm creating a homebuilt framework? I'm doing all my MVC server-side.
... the RIGHT way. Sorry, just felt the need to complete the sentence :D
-
I wouldn't bother explaining, they don't want to know.
-
@RaceProUK said in Angular 2 first impression:
@ufmace said in Angular 2 first impression:
If you're gonna write some huge thing with multiple dynamically-loaded pages and form validations and AJAX behavior, then for God's sake use Angular instead of creating yet another half-assed homemade "framework".
What makes you think I'm creating a homebuilt framework? I'm doing all my MVC server-side.
Impressive, I've never been taken out of context quite so obviously. I thought that sort of thing only happened to famous people. Does this mean that I'm famous now? When do I get the champagne and strippers in a 4-star hotel suite?
-
Don't tell them anything about realtime updates using websockets or browser notification apis they might lose their shit.
Passive Aggressive bitching aside ..
Has anyone used Angular with Cordova. I am trying to setup a project at the moment?
I quite like cordova made a nice little app over the weekend using my soccer api I am building for my website.
-
@ufmace said in Angular 2 first impression:
I thought that sort of thing only happened to famous people.
Are you saying that your avatar isn't a picture of you?
-
@Yamikuronue said in Angular 2 first impression:
@ufmace said in Angular 2 first impression:
Naturally, I set everything up like the example, and the Link element works, but when I click the link, the URL bar changes, but it doesn't show the element that the related Route tag says.
This sentence exemplifies everything that's wrong with modern web dev.
Not really. Unless you'd like to tell us how React is magically supposed to know where the child page is supposed to go without any kind of
{children}
tag in the code?
-
@lucas1 said in Angular 2 first impression:
Angular 2 is pretty nice to work with and makes a lot of sense
Right until you need to do things like links on webpages?
@ufmace said in Angular 2 first impression:
Naturally, I set everything up like the example, and the Link element works, but when I click the link, the URL bar changes, but it doesn't show the element that the related Route tag says.
-
It is trivial to link it. What are you on about?
EDIT: The second quote is talking about how the React Router works ... FFS. It is not even the same fucking framework.
-
@boomzilla said in Angular 2 first impression:
@ufmace said in Angular 2 first impression:
I thought that sort of thing only happened to famous people.
Are you saying that your avatar isn't a picture of you?
That depends, would you be interested in some blue meth? I hear it makes programming and TDWTF posting more fun and exciting.
-
@ufmace said in Angular 2 first impression:
would you be interested in some blue meth? I hear it makes programming and TDWTF posting more fun and exciting.
It's probably how most JS stuff is created anyway.
-
@loopback0 said in Angular 2 first impression:
@lucas1 said in Angular 2 first impression:
Angular 2 is pretty nice to work with and makes a lot of sense
Right until you need to do things like links on webpages?
@ufmace said in Angular 2 first impression:
Naturally, I set everything up like the example, and the Link element works, but when I click the link, the URL bar changes, but it doesn't show the element that the related Route tag says.
Until you want to do cool things like front-end routing where the next page is substituted in live with JS so that following a link has the next page ready to use in like 20ms instead of waiting for a half-dozen round trips to the server, re-parsing JS and CSS, etc.
Nah, let's just keep doing everything like it's 1995.
Not to mention that I was talking about React, not Angular 2, and I figured it out like 10 minutes after I posted, naturally.
-
@ufmace said in Angular 2 first impression:
Not to mention that I was talking about React, not Angular 2
My bad.
-
@lucas1 said in Angular 2 first impression:
Don't tell them anything about realtime updates using websockets or browser notification apis they might lose their shit.
Passive Aggressive bitching aside ..
Has anyone used Angular with Cordova. I am trying to setup a project at the moment?
I quite like cordova made a nice little app over the weekend using my soccer api I am building for my website.
Cool, how do the mobile apps it makes look? I've always had the impression that you have to write a real native app (Java for Android, Obj-C for iOS) to get good functionality and responsiveness, and apps made with any cross-platform framework tend to be ugly and slow etc.
-
So far it just like building a regular web application. It works fine on my moto-g but I would have to test on some older devices.
-
To all the people who are dissing SPA frameworks. Fine, SPA frameworks are all bloated pieces of shit, I get it.
But what's the alternative?
There are only two.
1. Backend rendering (also known us "web development before SPA-a")
Render everything in your comfy stable backend template and serve it to the user pre-chewed. Fast and smooth, what's not to like?
This was OK 10 years ago. In a modern app, you want fields to validate right away, not after a reload. You want widgets to update in real time. You want one widget update to trigger all the related widget updates. You want popups, you want page transitions, you want 1000 different things that, while possible to do with custom AJAX code, lead to a huge mess of code duplication, glitchy callbacks and race conditions that is a nightmare to maintain. SPA in contrast is MUCH cleaner solution, at least from the programming viewpoint.
Add to that the need for one backend to now serve mobile clients as well (so with MVC + API, you have code duplication on the backend as well).
Add to that the need for frontend coders to work directly with your backend code (eg. in razor/twig/whatever templates). So now you have to nurse them until they can start up the entire project on their machine, resolve issues, etc. And also, listen to them then whining about "this is backend, not my area, whaa whaa!"
While backend rendering still has its uses and is definitely a better option in some occasions, the advantages and clenliness of SPA are clear to see. It's the future.
2. Write your SPA without a framework
Ok, so none of the SPA-s quite meet your high criteria, so you decide to write your own instead. You'll go lean and mean. No more 100 layer stack traces, you won't include a thousand features you don't need. Just a pure, simple code to drive exactly the application you are making and nothing more.
Pff, in your fantasy, maybe. In reality, you end up with a huge mess that's unmaintainable by anyone but you, and pretty soon, even by you. All these SPA frameworks are maintained by people who are not only better experts than you, but who also have all the time in the world to fine tune their software. Thinking you'll do better under the product cycle time pressure AND while developing an actual application is the height of arrogance.
Just use a SPA framework, alright? Don't be one of those "genius architects" who are blazing their own way, until one day they end up on the front page of TDWTF.
-
@cartman82 said in Angular 2 first impression:
800+ modules with almost 20K source files.
This is just to set up a gulp build system for a project that outputs a single <h1> tag on the screen.Every time I question my decision to avoid all these fancy frontend frameworks because a silly bug in my own code bites me on the ass I see something like this.
Hello Mr. Bug, how are you doing today? What? Nooo, I'm not annoyed you're here! It could be worse. Much worse...
-
@Onyx I expect half of it isn't included when you prep for production. There is a lot of debugging stuff in there.
-
@blakeyrat much better than angular 1 according to the following benchmarks.
-
@lucas1 What is its performance relatively to GOOD software?
-
@blakeyrat Define "GOOD"
-
@lucas1 Let's take Microsoft Word. If you implemented Microsoft Word in Angular 2, how would it perform compared to Microsoft Word?
I'm guessing "ass".
-
@blakeyrat said in Angular 2 first impression:
I'm guessing "ass".
I wasn't asking you what hole you were speaking out from. I already know the answer to that.
In anycase it is not an experiment we can validate with a reasonable amount of time and resources. So the question is unanswerable and you know that.
The performance is much faster than other full fat JS frameworks.
-
@lucas1 said in Angular 2 first impression:
The performance is much faster than other full fat JS frameworks.
That doesn't move it out of "ass" territory.
-
@blakeyrat said in Angular 2 first impression:
That doesn't move it out of "ass" territory.
Your proposed experiment definitely came from ass territory, so this shouldn't be a surprise.
-
@boomzilla I guess that's just because I'm so insane and illiterate.
-
@blakeyrat Yeah, probably. Why would you think a native C++ and something designed to be run in a browser talking to a server over the internet make sense to compare?
-
I won't mention that Google Docs Writer loads up faster than Word 2010 on my work machine ...
-
@lucas1 said in Angular 2 first impression:
I won't mention that Google Docs Writer loads up faster than Word 2010 on my work machine ...
But... you... did... mention... it... you... are... imperfect...
-
@cartman82 Also commonality.
Let's say you write your own SPA. Let's even say that you're a super-genius programmer and your homemade SPA is a lightning-fast bug-free masterpiece of testability, separation of concerns, de-duplication, etc. The problem is that nobody else knows it, and there aren't any docs for it. If you get hit by a bus and I have to come in and work on it, I'm going to have to spend weeks or months figuring out how your stuff works before I can be productive. If you were using Angular, though, I'd already know a lot about how the app is put together, and know what to look for to figure out the rest.
-
Don't say anything sensible, you are doing it wrong.
-
@boomzilla He's probably also ignoring the complexity of deploying the application to all the users he needs to support. Which is a complete bear when using something written in C++ compared to just serving up HTML, CSS and javascript from a website.
-
@cartman82 said in Angular 2 first impression:
While backend rendering still has its uses and is definitely a better option in some occasions, the advantages and clenliness of SPA are clear to see. It's the future.
This pretty much sums up my views on modern web dev. It's shitty and constantly changing but we're still figuring it out.
I want to wait 10 years before getting into it though, maybe things will settle down by then.
-
@ufmace said in Angular 2 first impression:
you have to write a real native app (Java for Android, Obj-C for iOS) to get good functionality and responsiveness, and apps made with any cross-platform framework tend to be ugly and slow etc.
IME that's pretty much always the case. There are definitely 'tells' when you're using a browser-based app - and depending on the framework it's either "this is literally a WebView around a slightly mobile friendly-ish site" or "Huh, why does it do that? Oh, it's a Chrome tab wtf???". That's not to say that you can't do it right (maybe it's possible), and there's obviously a lot of work that goes into a real native client, but they're almost always better. That may have something to do with the fact that (at least on Android), when you write a native app you have access to all the native UI components, themed properly with the end-user's system, without any recreating it in CSS or crap like that, which almost always looks terrible. (Well, that's assuming people don't go out of their way to make their app look
horribleunique and rewrite all the UI components in Unity or some idiotic thing like that).
-
The problem is cost. iOS devs are fucking expensive.
-
@cartman82 said in Angular 2 first impression:
In a modern app, you want fields to validate right away, not after a reload.
For fuck's sake, we literally solved that problem by 1999. Without needing bullshit SPA frameworks.
-
@Yamikuronue said in Angular 2 first impression:
we literally solved that problem by 1999
Yeah but now we're in the future which means things must be done a new way.
-
@loopback0 Like HTML5's validation attributes? ;)
-
I swear to jesus. I want to force everyone who calls themselves a front-end developer to do one serious project server-side with minimal AJAX and nothing else. They'd be astonished at how much can still be done.