Yes, you are right, they are. The same holds for classic JSP-s also, they 
first get compiled to Java source and then compiled with javac to servlets, 
thus they finally get type safety and compile-time checking. (They however 
won't give you the same discoverability as pure Java code. ) These are 
however on the server-side.

What use-cases and aspects make you prefer the declarative approach? I'm 
trying to widen my perspective as much as possible.

(Afaik, angular2 views will also only be evaluated runtime, not 
compile-time, because although angular2 itself is written in typescript, it 
won't enforce you to use any specific language.)

Thanks, Gábor

On Sunday, June 7, 2015 at 4:59:10 PM UTC+2, Shawn wrote:
>
> Aren't ASP.NET MVC (C#) and Play (Scala/Java) wildly popular examples of 
> typesafe declarative views? 
>
> Personally, at this point I'd prefer just the opposite - views to become 
> *more* declarative (and typesafe). 
>
> I'm hoping that Angular2 (via TypeScript) and WebStorm will only improve 
> in this regard (declarative views with IDE support and type safety). I 
> presume angular2 views written in TS will get compiled similarly to 
> ASP.NET MVC or Play views and hence enjoy similar benefits.
>
>
>
> On Friday, June 5, 2015 at 2:45:27 AM UTC-7, Gábor Farkas wrote:
>>
>> Hi there,
>>
>> The rise of TypeScript, closure compiler and facebook flow highlights 
>> that even javascript developers sometimes miss static type checking. I'm 
>> wondering if Angular developers miss type safety in their templates. I've 
>> sumed up my point of view in this blogpost: 
>> https://medium.com/doctusoft-coding-style/benefits-of-imperative-type-safe-views-d9ca4707a48a
>> To outline, I think creating views in an imperative way can have big 
>> benefits over html templating:
>>
>>    - template hierarchy is *discoverable, navigable*, easire to refactor.
>>    - binding expressions can be *typesafe *and compile-time checked.
>>
>> What do you thing? Does anyone else miss these things?
>> I've already prototyped doing this with angular 1.x, but I'm wondering if 
>> we can have first-class support to imperatively build views in major 
>> frameworks.
>>
>> Cheers, Gábor
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to