Coffeehouse Thread

17 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

The web platform is cool (AngularJS)

Back to Forum: Coffeehouse
  • User profile image
    fanbaby

    Take a look at this, a cool JsFiddle snippet. Notice: no js other then including AngularJS via settings.

    EDIT: Just checked, IE10 is a no go, try something else (it should definitely work on IE)

  • User profile image
    DCMonkey

    That does look cool. Will have to dig further.

     

  • User profile image
    PaoloM

    Maybe one day these so called "developers" will learn how to write actual real software...

  • User profile image
    Charles

    @fanbaby: Seems to be targeting webkit (as seen in a quick scan over the CSS (-webkit...))

    C

  • User profile image
    DCMonkey

    , Charles wrote

    @fanbaby: Seems to be targeting webkit (as seen in a quick scan over the CSS (-webkit...))

    C

    The jsFiddle site is cool too, but I (and I think fanbaby) was talking about the AngularJS framework.   

     

    AngularJS is a structural framework for dynamic web apps. It lets you use HTML as your template language and lets you extend HTML's syntax to express your application's components clearly and succinctly. Out of the box, it eliminates much of the code you currently write through data binding and dependency injection. And it all happens in JavaScript within the browser making it an ideal partner with any server technology.

    Angular is what HTML would have been had it been designed for applications. HTML is a great declarative language for static documents. It does not contain much in the way of creating applications, and as a result building web applications is an exercise in what do I have to do, so that I trick the browser in to doing what I want.

    The impedance mismatch between dynamic applications and static documents is often solved as:

    • library - a collection of functions which are useful when writing web apps. Your code is in charge and it calls into the library when it sees fit. E.g., jQuery.
    • frameworks - a particular implementation of a web application, where your code fills in the details. The framework is in charge and it calls into your code when it needs something app specific. E.g., knockoutsproutcore, etc.

    Angular takes another approach. It attempts to minimize the impedance mismatch between document centric HTML and what an application needs by creating new HTML constructs. Angular teaches the browser new syntax through a construct we call directives. Examples include:

    • Data binding as in {{}}.
    • DOM control structures for repeating/hiding DOM fragments.
    • Support for forms and form validation.
    • Attaching code-behind to DOM elements.
    • Grouping of HTML into reusable components.
  • User profile image
    kettch

    @PaoloM: I think these days it's an elitist thing to go out of your way to write stuff that doesn't work in IE.

    It's a cool demo on the jsFiddle though. It does work in IE10 so, maybe fanbaby changed the link since the thread started.

  • User profile image
    exoteric

    Isn't this kind of like knockoutjs? I.e. Google's re-invention of knockoutjs? I haven't looked closely though.

  • User profile image
    cbae

    , kettch wrote

    @PaoloM: I think these days it's an elitist thing to go out of your way to write stuff that doesn't work in IE.

    It's a cool demo on the jsFiddle though. It does work in IE10 so, maybe fanbaby changed the link since the thread started.

    I can't seem to get it to work with IE10. Works in Chrome though.

  • User profile image
    DCMonkey

    , exoteric wrote

    Isn't this kind of like knockoutjs? I.e. Google's re-invention of knockoutjs? I haven't looked closely though.

    They sound similar in part, but I think AngularJS goes further with Dependency Injected Services, Routing, Form Validation support, and IMHO a nicer (and extendable) templating syntax.

  • User profile image
    Bass

    That looks like it could make web development a lot easier. Thanks for sharing fanbaby.

    My understanding is the library works on all modern browsers (there are apparently some gotchas with IE that you have be careful of). However, that specific example works on Webkit browsers, because of the HTML and CSS that is used. Getting to work exactly like Chrome is non-trivial because FF lacks the range input type; this is when jQuery UI would come in handy. It still works in Firefox if you type in the colors.

    Getting it work in IE9 is a bit more challenging, I'm thinking you'd have to convert the color values to hex first using JavaScript.

  • User profile image
    cbae

    , DCMonkey wrote

    *snip*

    They sound similar in part, but I think AngularJS goes further with Dependency Injected Services, Routing, Form Validation support, and IMHO a nicer (and extendable) templating syntax.

    The last time I checked out KnockoutJS (which was quite a while back), the templating syntax used was for a jQuery plugin (jQuery.tmpl) that was no longer going to be supported as part of the core jQuery plugins. The jQuery team dropped it for reasons unknown (as far as I can tell) in favor of a new templating engine, which has yet to materialize AFAIK.

    jQuery.tmpl got moved over to gitHub, and it's since been abandoned. https://github.com/jquery/jquery-tmpl

    But if you want to fork the project and continue improving it, you can. Hooray for open source!

     

  • User profile image
    PopeDai

    , PaoloM wrote

    Maybe one day these so called "developers" will learn how to write actual real software...

    Aye. As cool as it looks, I'm seeing this will be a great way to make un-followable spaghetti code.

  • User profile image
    magicalclick

    Works on my Win8 IE10. Just some slider controls? Is that what I should be looking at?

    Leaving WM on 5/2018 if no apps, no dedicated billboards where I drive, no Store name.
    Last modified
  • User profile image
    cheong

    @magicalclick:And the slider works on my WP8 IE10 too. Want to ask what does not work.

    Recent Achievement unlocked: Code Avenger Tier 4/6: You see dead program. A lot!
    Last modified
  • User profile image
    Sven Groot

    There's supposed to be some rectangle that updates its colour automatically as you change the slider values. That doesn't appear on IE.

  • User profile image
    cheong

    @Sven Groot:Ok. On the other hand, Nokia's "Nokia Xpress" browser can render the box correctly, but refuse to render the sliders.

    Seems can't find WP browser that can keep both.

    Recent Achievement unlocked: Code Avenger Tier 4/6: You see dead program. A lot!
    Last modified
  • User profile image
    LSTA

    AngularJS is now supported in VS 2013! Suddenly, I'm really excited by Microsoft tech again.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.