Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Ext User
    Join Date
    Sep 2010
    Posts
    7
    Vote Rating
    0
    mythz is on a distinguished road

      0  

    Default Is all javascript the right way?

    Is all javascript the right way?


    Hi all,

    I'm new to the Sencha/Ext.js way of doing things all in JavaScript. On first impressions it seems to be anti-spirit of the web where you would structure your document using HTML and then append behaviour by using JavaScript.

    At the moment the API appears to be non-obvious and truthfully to me it looks like a lock-in strategy since the code we write is heavily binded to the Ext.js API and not portable. Is there any technical reason for going with this approach?

    Also how well does Ext.js work with other js frameworks such as the google closure library?

  2. #2
    Ext JS Premium Member
    Join Date
    Aug 2007
    Location
    Antwerp, Belgium
    Posts
    555
    Vote Rating
    27
    joeri has a spectacular aura about joeri has a spectacular aura about joeri has a spectacular aura about

      0  

    Default


    I tried for a long time to write code "in the spirit of the web", and eventually I had to conclude that the Ext approach is the right one. HTML is too low-level to structure application user interfaces in. You need to abstract it as components and layout systems in order to develop features faster. Ext basically is a higher-level language to build your programs in. Would you complain that a PHP app is not portable because it is bound to PHP?

    Ext isn't the only approach though. ASP.NET offers a different way of abstracting (server-side instead of client-side). Zend Framework does something similar for PHP. GWT even abstracts away the JavaScript language by letting you write Java programs that become web apps. The point is that without a level of abstraction, you end up wasting a lot of development hours messing with details that are irrelevant to the feature you are building.

  3. #3
    Ext User
    Join Date
    Sep 2010
    Posts
    7
    Vote Rating
    0
    mythz is on a distinguished road

      0  

    Default


    So compared to other frameworks that adhere to the spirit of the web, i.e. jQuery, Prototype, Closure Library, etc. It is much easier to port a widget you've created to work across with these frameworks.

    >>Would you complain that a PHP app is not portable because it is bound to PHP?

    Yeah not the same thing - PHP is a programming language. Your equivalent argument would be "your JavaScript app is not portable because its bound to JavaScript".

    ASP.NET, Zend, etc are server-side web frameworks (and not relevant here) they are all capable of generating framework-agnostic client JavaScript. GWT takes the approach it does because they believe that having a statically language to generate JavaScript has proven benefits.

    I still don't understand the reason for the unique approach taken by Ext.js. The web is a great development platform by design, the semantic HTML markup, can easily be styled by CSS and manipulated by JavaScript. They are essentially DSL's for their respective roles in building a UI. Ext.js has literally taken out the HTML element and replaced it with a proprietary API.

    I just want to understand before I commit to this library its reasons for doing so, and advantages it has over the conventional approach, etc. As I said earlier I'm concerned that this is a lock-in tactic.

  4. #4
    Ext JS Premium Member
    Join Date
    Aug 2007
    Location
    Antwerp, Belgium
    Posts
    555
    Vote Rating
    27
    joeri has a spectacular aura about joeri has a spectacular aura about joeri has a spectacular aura about

      0  

    Default


    PHP is more an API than a language, given its many thousands of functions. It's easy to migrate PHP syntax to Python using semi-automated scripts, but migrating actual code is impossible because of all the PHP-specific functions. Just like PHP's selling point is the API's it exposes, Ext's selling point is the same.

    jQuery and prototype are the browser abstraction subset of what Ext does (Ext can run on top of jquery), but not the DOM abstraction. The components built on top of those platforms live in isolation from each other, and applications designed using them are very DOM-oriented when dealing with actual business logic. Ext puts one more level of abstraction on top of the DOM so you can think in terms of Stores, Components and pure business logic. Depending on where you stand this is either ingenious or blasphemous.

    The unique approach of Ext is doing the same thing ASP.NET does, abstract away the DOM to a higher-level API, but it does it in pure JavaScript, without a server-side component. The advantage is that client/server communication channels can be more tightly controlled, which can be convenient for security, performance, offline, ...

    If you don't see the value, then by all means, don't use it. There is no such thing as a "one size fits all" toolkit. Ext may be the wrong choice for you. It happened to be the right choice for me.

  5. #5
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,496
    Vote Rating
    44
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Quote Originally Posted by mythz View Post
    So compared to other frameworks that adhere to the spirit of the web, i.e. jQuery, Prototype, Closure
    What spirit would that be?

    Those libraries are different.

    jQuery is merely a set of foundation classes like Ext Core.

    There's no point using any textual HTML at all. It does not offer any advantage to send down limited bandwidth a whole load of "<" blah bla + ">" text, and then in a second pass, crawl over that, setting up some homegrown object model to "activate" the resultant DOM.

    Face it, applications now are DOM applications. The fact that you once created a DOM using "<" thingies is irrelevant.

    It's the resulting DOM, and how it is managed that is important.

    And Ext offers the best way to create a fluid, managed DOM application.

  6. #6
    Ext User
    Join Date
    Sep 2010
    Posts
    7
    Vote Rating
    0
    mythz is on a distinguished road

      0  

    Default


    >>PHP is more an API than a language

    Seriously I hope we don't get side tracked into debating whether PHP is a programming language or not (i.e. it may be interpreted but its still a programming language). Cross-compiling is technically possible and has been done for many different languages. A programming language contains the essence and intent of your program by definition it is tightly-coupled.

    ASP.NET (which I've had many years experience with) is another leaky abstraction that I consider that breaks the spirit-of-the-web, Microsoft is learning from problems inherent from their approach and its latest incarnation ASP.NET MVC follows a more natural web development model. For anyone that is interested I've wrote an article highlighting some of these issues here: (http://www.servicestack.net/mythz_blog/?p=251).

    Anyway what I'm really wanting to find out is the reason why it's built this way? i.e. what are its advantages?
    Maybe its because it enables more control and encapsulation than what is otherwise possible?


    >>What spirit would that be?
    Not going to be a surprise to anyone here but just to spell it out: The spirit of using semantically correct markup, Style and design applied with CSS and Behaviour applied with JavaScript.

  7. #7
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,496
    Vote Rating
    44
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    All the markup I use is semantically correct:

    Code:
    <body></body>
    The DOM which is created from my description of how I want my application to work is (of course, because it exists) a valid HTML DOM, and is styled by CSS and has behaviour added by Javascript.

    I don't see your question really.

  8. #8
    Ext User
    Join Date
    Sep 2010
    Posts
    7
    Vote Rating
    0
    mythz is on a distinguished road

      0  

    Default


    >>All the markup I use is semantically correct:

    Funny guy is this you?

    This is obviously not helpful. I was just after the advantages of the Ext.js approach of owning the whole UI layout rather then the conventional approach of graceful enhancement to existing markup - This will be my 4th time now in just as many posts. I'm not looking to criticize I just want to know the advantages from someone who knows them and the primary reasons for their approach.

    >>I don't see your question really.

    That's ok lets leave it for someone who does.

  9. #9
    Ext JS Premium Member
    Join Date
    Aug 2007
    Location
    Antwerp, Belgium
    Posts
    555
    Vote Rating
    27
    joeri has a spectacular aura about joeri has a spectacular aura about joeri has a spectacular aura about

      0  

    Default


    The PHP point is not a side-track. You're missing the point that I'm trying to get across if you think it's a side-track. The point is that the API matters. Ext offers a different API than regular DOM / HTML, and this has distinct advantages in development efficiency / program scalability.

    Ext makes compromises for this "richer" API. It trades in SEO, and graceful degradation. However, I make apps where those two are irrelevant (login-walled business apps that can assume a specific set of browsers). In my experience the API that ext delivers is not possible using "semantic" HTML without a LOT of very messy code that breaks easily. Semantic HTML is a tool that serves an end (search engine visibility). If the end is not required, semantic HTML is not required. Ext merely draws that conclusion to its extreme.

    [update]Graceful degradation does not scale to apps as complex as the ones built with ext. Google docs doesn't do graceful degradation, it merely has separate front-ends for low-powered devices. That's Ext's strength. It drops the low-end to reach the high-end.

  10. #10
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,496
    Vote Rating
    44
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    I'm not "funny".

    I want to know why is there an obsession with creating megabytes of HTML code. Because there's a lot of propaganda which says you must?

    The business requires me to create a UI, that's all.

    Megabytes of "<" stuff is not good. It's difficult to generate meaningful "<" stuff, and difficult to then make that do anything.

    Generating a description of the UI is a lot easier.

Similar Threads

  1. Javascript changes
    By BranimirCorluka in forum Ext.nd for Notes/Domino
    Replies: 0
    Last Post: 3 Jun 2009, 10:42 PM
  2. Dynamically load javascript library and native javascript calls
    By okwei in forum Ext GWT: Help & Discussion (1.x)
    Replies: 2
    Last Post: 4 Nov 2008, 3:43 PM
  3. How do I do this in OO Javascript?
    By willdudziak in forum Ext 2.x: Help & Discussion
    Replies: 10
    Last Post: 14 Feb 2008, 3:24 PM
  4. help with javascript....
    By dmedina2000 in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 4 Feb 2008, 12:26 PM
  5. Javascript Security Paper - Prevent JavaScript Hijacking
    By danh2000 in forum Community Discussion
    Replies: 3
    Last Post: 27 Jun 2007, 9:39 PM

Thread Participants: 3