Why I dont see YUI used that much often - yui

I have been using jQuery/Prototype/ExtJs and other frameworks for last two years. These frameworks have been very useful.
I switched to YUI recently and finding the learning curve a bit too steep. Also the framework is not making my life as easy as with Extjs or Jquery.
When I consulted several other developers no one seems to be very enthusiastic about YUI. Very few of them have actually used it. Of course this depends on where I stay and what kind of people I interact with but can I say safely that YUI is not beign received as enthusiastically as jQuery? Why is it so ?

NB: I'm an engineer on the YUI team! I think you ask a great question, something I have wondered myself.
IMO, jQuery is more widespread than YUI because it is easy to sprinkle it on web pages that need simple DOM manipulations and basic AJAX or animations. That said, YUI is an extremely popular library that has historically been a favorite of more advanced developers and application builders. We do have a huge and thriving online community on yuilibrary.com -- perhaps folks are too busy writing great code to make a lot of noise? ;-)
That said, we are hearing a lot of buzz these days from jQuery folks hitting the limits of that library as they transition from throwing together simple effects to needing more maintainable, performant, and well-architected code. YUI 3 takes you from the basics to the most complex applications without missing a beat. It is a world-class platform for novices, hackers, and application developers alike: a concise, convenient, and intuitive API that is lightweight and lightning fast, PLUS a well-thought-out infrastructure and comprehensive suite of tools to help you code like a professional.
I agree that the learning curve for YUI has been high -- we are in the midst of a website redesign and writing an O'Reilly cookbook to address exactly that issue. We're also hosting our second annual YUIConf this November to unveil our latest and greatest. We've coming a long way since the days of YUI 2 and we're excited to make it as easy as possible for folks like you to ramp up on YUI 3.

Akshar -- my response is YUI-centric, for sure, but the YUI developer community is huge, enthusiastic, and growing. Check out http://yuiblog.com/blog/category/in-the-wild for some of the implementations we've seen recently. In addition to what's out there in open source, the Yahoo! home page, Yahoo! Search, Flickr, and the upcoming redesign of Yahoo! Mail are all based on YUI 3, the next generation of the library -- which has been welcomed by developers as having industrial strength power along with the concision and selector-driven syntax that makes libraries like Prototype and jQuery so fun to use. My advice: Try it out. YUI 3 is a unique, incredibly powerful library, and its 200 community contributed gallery modules (a number that grows by the week) make it one of the most comprehensive libraries out there.

As a user of both jQuery and YUI, I have to admit that I look at them in almost completely different lights. I use jQuery for custom effects, animation, interactivity on our externally-facing website. The visual extensibility of jQuery means that we can customize the look and feel of these elements to match the rest of our website. I've used YUI as a quick and easy way to develop a snazzy front interface for some of our internal applications. These internal applications are simple Apache/MySQL/PHP apps, and YUI allows for simplified data visualization, form handling, tabs, etc. without having to worry about the look and feel as much. The standardized, slightly bland interface elements are a perfect, no-nonsense approach to quickly developing and rolling out these apps.
I found the learning curve to be a bit steep myself, but the examples help out a lot.

I've been using ExtJS and JQuery for some time, but now i'm experimenting with YUI 3. I like the general idea behind YUI (modules, async loader, plugins) but some things annoy me:
lots of documentation, but some things aren't documented at all or very scarcely
some features are very basic (data grids) compared to their ExtJS counterparts.
you never know which features are there in the core, in gallery or aren't implemented at all. You need to do the research yourself.
the framework feels less coherent than ExtJS
I'm trying to find a replacement for ExtJS for building business applications, but didn't find any framework that would be as rich and complete as ExtJS. I don't like how ExtJS looks and how it forces some strange implementation/architecture decisions on you (MVC!), but have to admit it's really hard to replace.

Related

Is it viable to build a Web Dashboard in Clojure?

I am planning to build a web dashboard where I can analyze the financial records from a company through graphics, tables, ...
I already have the software, so the dashboard will only read the data, and not manipulate it.
It will be something like this, but simpler. Containing reports, graphics, options to select dates, intervals, etc.
But I am thinking, is it viable to use Clojure? And jQuery, CSS, HTML also.
Currently I work with the Luminus Web Framework for Clojure, but I am wondering if it is worth to do this in Clojure or if there are other languages that are better to do it.
Of course I am familiar with the language already, so it is a pro. But I am also open to suggestions.
It is not that hard at all! In fact, there exist great libraries which solve all the challenges involved in building a dashboard - scheduling, caching, transferring data to the client, visualization(and auto reloading).
We are working on a framework for building realtime Clojure dashboard. Have a look at https://github.com/multunus/dashboard-clj. We have used the following libraries:
Immutant's scheduler for scheduling
Core.async to simplify data flow on the backend
Sente for websocket communication
re-frame for client side state and view management
Stuart Sierra's component library for managing stateful components
In order to create beautiful visualizations you may take a look at d3 or highcharts. CLJSJS and Reagent cookbook will gives a good overview of how to use these js libraries(and many many more).
Clojure is an absolutely fantastic tool for building a web dashboard. The other answers here do a pretty good job of laying out the landscape as far as basic web technologies. On this side of things, I'll simply add I'm a big Reagent / Re-frame fan, and would go that route for React wrapper over Om.
As far as data visualizations, you may be interested in checking out Vega-Lite & Vega, which you can use from Clojure or ClojureScript (Reagent) by using a simple but flexible dataviz library I wrote called Oz:
https://github.com/metasoarous/oz
Vega-Lite & Vega are designed based on the ideas of the Grammar of Graphics, which inspired R's popular ggplot2 library. The core idea is that data visualizations should be built according to declarative descriptions of how properties of the data map to aesthetics of the visualization. Vega-Lite & Vega however take things one step further in providing a grammar of interaction, which allows for the construction of interactive data visualizations and sophisticated explorer views. Moreover, it ups the ante on the declarative nature of the GG in that Vega-Lite and Vega specifications are described as pure data (JSON), making it very in line with the data-driven philosophy of the Clojure world, and paving the way for seamless interoperability with other languages and sharing features.
Vega-Lite is more or less the higher lever, day-to-day data science tool, focusing on providing high leverage and automation based on very spartan specifications. It compiles to Vega, which is a somewhat lower level and more powerful, but less automated version of Vega-Lite. Usually starting out with Vega-Lite, and switching to Vega only as needed is sufficient.
For more on Vega & Vega-Lite see: https://vega.github.io.
I don't see any reasons why it wouldn't be viable to build a web dashboard in Clojurescript.
I suggest that you look into a library call reagent, which provides a minimalistic interface between react and clojurescript, so theoretically everything you can do with react should be possible in clojurescript/reagent (with the added benefit that it will be faster than React). You probably might be interested in reframe which is a framework for building single page applications.
React has been proven as a robust tool to build powerful UI.
You can do everything you can do in JavaScript using ClojureScript (just as you can do everything you do in Java using Clojure). So as others have commented, I would definitely recommend ClojureScript, especially since you know Clojure already. You may find out that you do not need jQuery etc.
The common choice to generate html is to use React.js via a wrapper library like:
reagent
Om
Both can generate HTML.
Reagent (and maybe re-frame) are the easiest ones to get started. Especially since there are components libraries like soda-ash, and a hiccup-like syntax.
Om (by the creator of ClojureScript), and maybe untangled are also a good choice, especially if you need to manage complex data. You can get a hiccup-like syntax via sablono.
Dashboards have been built using it (see the circleCI dashboard as a real-life dashboard example). This is the one I use personally.
Hoplon is also an interesting choice, as you mentioned.
Also have a look at cljsjs for pre-packaged js libraries.
As for the CSS, this is an orthogonal concern but yes of course you can use it (or even less and sass, there are Clojure wrappers for it). You can even generate CSS from Clojure code with garden,
You can find an example project using boot (by the same authors as hoplon), sass, reagent called saapas, but there are many more in the wild.
As you see there are many viable options in ClojureScript to build a dashboard. I am myself building one and settled on Om.next, partly because I was using React.js before.

Are there standards for flowcharting websites?

I had some trouble figuring out how to funnel users through different stages on a website I'm building and I figured that drawing a flowchart might help me see things clearer. So I started drawing a chart in Dia and an hour later I'd figured out what models and views I need to add and how to interconnect them. Given a little time, I can really see this kind of charting becoming a useful asset in my web development skill set.
One thing that bothered me though was the lack of symbols for common stuff related to web development. A symbol for forms would be nice. Maybe a way to indicate AJAX requests. I'm sure you can think of lots of other stuff. What are people using to visualise such things? Is there a standard set of symbols that I should use? I stumbled across UML years ago but never really got comfortable with it. Could that be used for charting web sites or is it not well suited to this task?
I use sequence diagrams to document the flow from page to page (including Ajax requests). Within a page, activity diagrams are often useful
For an excellent, short, and readable introduction to the use of UML, see UML Distilled
Another option: Jesse James Garrett's visual vocabulary for interaction architecture and design.
I don't use it personally, prefer using UML Activity/State diagrams. However a few UX designers I know are strong advocates. ymmv.
I don't beleive there are official standards but the shapes never seem to differ likewise. For an operation use a box. Start and end use an oval. For a decision use a diamond. The graphical ones aren't standard, but can still be used.

Java Server Faces 2.0 or Tapestry 5.2? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
Are there any up to date articles comparing JSF 2 and Tap 5? Everything I seem to find is comparing JSF 1.2 and Tap4.
Does anyone have any experience with T5 or JSF2 and time to evangelize one or the other?
I'm looking for a framework for rapid development in Java, on top of Hibernate and mySql.
Other framework sales pitches accepted, but JSF2 and T5 are currently our top picks.
I've worked mostly with Tapestry 5 over the last few years; I won't evangelize though. Choosing a good web framework is certainly a good idea, but usually not your prime problem.
A list of good and bad things from the top of my head:
Tapestry 5 has a rather steep initial learning curve. There's magic and metaprogramming happening everywhere. You could argue it's overdoing convention over configuration.
Simple stuff is very simple to do, harder stuff requires you to understand in detail how Tapestry 5 works and can be hard if you don't (yet).
I love the live class reloading. You change something in a T5 component or template and you see it right away. Really useful when your app does a lot of stuff and takes 30s+ to start in Jetty.
Tapestry does not support dynamic page structures. This is usually not a problem, but if you're developing some kind of portal solution where people can individually arrange components, don't use Tapestry. Tapestry is for static structures, which it handles really well.
Tapestry has beautiful URLs. package/page/${param1}/${param2} ...
Tapestry uses the proper HTTP verbs to do stuff. A link is a GET, a form submission is a POST, the post-redirect-get pattern is the norm.
Tapestry's community is not very large. Apart from Howard Lewis Ship, there are a few other committers, but nothing like the support Wicket has. Thus, Tapestry evolves rather slowly.
Tapestry's approach to templating (instrumenting HTML with types and IDs) is one of the better ones I've seen, but it doesn't go as far as Wicket in keeping code out of the HTML. On the other hand, the class files are less verbose. Still, I think the Wicket way is preferable.
Tapestry is somewhat under-documented.
I like Tapestry very much, I think you can be very productive with it, and I would always happily participate in projects where it is used.
I would, however, advise to also check out Wicket. It seems to have gained more traction than Tapestry and solves some problems less magically, but with a common sense approach.
(I've only briefly used JSF 1, which I found was completely off in just about everything it did: wrapping every request in a POST (thus breaking basic web functionality), using JSPs, but requiring to use special tags for everything, even plain HTML... I read a lot has improved in the JSF camp, but I can't tell, I've never looked at it again.)
Taking up your offer and pitching another Framework :
If you want really rapid development then you should look at the Play Framework.
I've used JSF/Richfaces/Seam/Hibernate etc and I'd say that using Play more than doubles your productivity. There are no deploy cycles. So no developer downtime. It's got JPA/Hibernate baked in and lots of plugins that extend it's functionality in other directions.
I also like the fact that it makes your pages so lightweight. My biggest issue with JSF was always the weight of the pages (unecessary IDs, lots of tables, client state etc)
Take some time and view the webcast.
Check out my presentation JSF 2.0 vs. Tapestry 5: A head-to-head comparison at Jazoon 2010. This might help you to make your decision.
As Tapestry committer I would advise you to choose Tapestry, but I think the best way to make the decison is to give both a try. Need more demo applications?
https://github.com/drobiazko/tapestry5inaction/tree/master/tlog
Most important Tapestry 5 feature for me is the flexibility of the framework. You can override almost every piece of code inside Tapestry's core, thanks to Tapestry IoC.
Don't look to me for an unbiased opinion ... Tapestry has been my life for several years now, and I continue to love it.
That being said, the learning curve is getting less steep, the documentation is improving rapidly, and Igor's book is just around the corner.
Some of the things that confuse people are simply lack of documentation; for example, the naming conventions are optional, there's always more explicit configuration (in the form of method annotations) that some people are more comfortable with.
To address a couple of Henning points:
Tapestry component templates are, by design, static (and this is very important to Tapestry's scalability and clusterablity story). However, an add-on that's part of my TapX library supports dynamic external templates that fill the gap.
Also, if you want to keep your templates maximally spare, you can do that too, such as:
<form t:id="myForm">
... in the template, with the remainder in the Java class:
#Component(parameters={"zone=target", "clientValidation=blur",
"context=client", "secure=true")
private Form myForm;
.... in other words, all the Tapestry specific content out of the template and into the code. Not ideal for trivial components (more switching back and forth between template and Java source) but great for keeping the worlds nice and separate.
I've been pretty pleased with Tapestry. It is a different approach than what most people are use to. It uses a lot of the same paradigm as WebObjects (what the iTunes store is built on).
Tapestry does a very good job of minimizing the amount of code you have to write to accomplish a task. This is great once you know what you are doing, but it can be frustrating at first while you are learning the naming conventions because some stuff seems to magically work and other things won't because you named wrong.
One of my favorite things about Tapestry is how little XML is required. For example, if you create a Hibernate entity, you place it in the com.example.entities package and give it the #Entity annotation. There is no other configuration necessary--no XML, no adding the the class name to a file somewhere, etc.
I'd highly recommend taking a look at actual code to see what you think. Here are a couple suggestions:
wookicentral.com/
github.com/spreadthesource/wooki
tapestry.zones.apache.org:8180/tapestry5-hotel-booking/
github.com/ccordenier/tapestry5-hotel-booking
Also take a look at the jumpstart site. It contains a number of examples along with the code showing you exactly how to use most of the various components. It also contains a starting point app that gives you some user management features if you want to base an application on it.
jumpstart.doublenegative.com.au/jumpstart/
Also check out the revamped Tapestry documentation. It isn't posted on the main site yet, but it is already a very big step forward:
people.apache.org/~uli/tapestry-site/
Use JSF 2, particularly if you make use of Java EE 6 features. If you want to have fancy UI, try Primefaces.
As per your requirement, the important part to consider is that you're using MySQL, and that's it. Therefore, take if from different angle. You're using JPA2 (and your persistence provider happens to be Hibernate in this case). With this approach, down the track you can quickly very easily 'swap' your persistence provider or database you're using.
Looks like Java EE 6 solves it.
Here's a pretty good comparison of Tapestry 5 and JSF 2
http://blog.tapestry5.de/wp-content/uploads/2010/06/JSF-2.0-vs-Tapestry-5.pdf
Note this was put together by Igor Drobiazko, a Tapestry 5 comitter
I love this question about Tapestry. Maybe it will influence your decision.

Personal Code Library [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
So I assume I'm not the only one. I'm wondering if there are others out there who have compiled a personal code library. Something that you take from job to job that has examples of best practices, things you are proud of, or just common methods you see yourself using over and over.
I just recently started my C# library. It already has quite a few small items. Common Regex validations, interfaces for exception handling, some type conversion overloads, enum wrappers, sql injection detection methods, and some common user controls with AJAX toolkit examples.
I'm wondering what kind of things do you have in yours?
I use my own wiki where I post code snippets and commentaries.
I find that more useful than having my own library. And since they are essentially notes and not full programs there isn't a problem with who owns the code (you or your employer ).
PS: I don't hide the fact that I have that from my employer. In fact most of them were positive and even asked for a copy.
Because I primarily do web development, I've abstracted out some common features that I end up doing frequently on sites for clients.
Ajax Emailer. Nearly every site I work on has some type of contact form. I wrote a utility that allows me to drop some HTML on a page, having JavaScript field validation, and a PHP library that requires me to change a few parameters to work with each client's mail server. The only thing I have to write is CSS each time I include it on to a page.
Stylesheet skeleton generator. I wrote a small JavaScript utility that walks the DOM for whatever page it has been included on and then stubs out a valid CSS skeleton so that I can immediately start writing styles without having to do the repetitive task for every site I work on.
JavaScript Query String Parser. Occasionally I need to parse the query string but it doesn't warrant any major modifications to the server (such as installing PHP), so I wrote a generic JavaScript utility that I can easily configure for each site.
I've got other odds and end utilities, as well, but they are kind of hacked together for personal use. I'd be embarrassed to let anyone see the source.
Update
Several people have asked for my stylesheet skeleton generator in the comments so I'm providing a link to the project here. It's more or less based on the way that I structure my XHTML and format my CSS, but hopefully you'll find it useful.
I have found that using Snipplr makes this incredibly convenient. You can tag items, save favorites, search by keyword, etc. I mostly use it for Vim-related snippets (common commands, vimrc file, etc.), but it can be used for anything. Check it out.
I have my personal C++ cross platform library here: http://code.google.com/p/kgui/
It's open source LGPL, I use it in my hobby / volunteer projects. I started it about 3 years ago and have been slowly adding functionality to it.
Back in the days of C programming on MacOS 7, i did write a fairly extensive OO library (yes, OOP in very old C) mostly to handle dialog windows. I abandoned it for PowerPlant (a nice C++ from Metrowerks) during the switch from 68k to PPC processors.
A little after that, i began writing web apps, first in PHP, recently in Django. On this aspect, my reusable code is limited to some tricks and code style.
But for all non-web (or with only small web componets), i've been using Lua. It's so fast to write and rewrite code, that there's very little incentive in reusing code. I mean, what's the point of copying a 10 line function and then adapt it? it's faster to rewrite it just for this project.
That's not so wasteful as it sounds. Lua code is so succint that my apps can be very complex, but seldom have more than a couple thousands lines.
At the same time, several Lua projects imply interfacing to C libraries. It's very easy to write bindings to existing libraries, so i just do that as a subproject. And these modules are what i do reuse! once and again... with very little (if any) changes from one project to the other.
In short: non-web projects are usually one-off Lua code, and some heavily reused binding modules.
I use Source Code Library from http://www.highdots.com/products/source-code-library/ since I can manage different textfiles, notes, screenshots and different programming languages.
I have several utility MATLAB functions that I have taken with me as I move from job to job, particularly ones that enforce W3C standards on the plots I make to ensure that text and background colors have a good luminosity ratio. I also have a function that uses ActiveX to insert a MATLAB figure into PowerPoint.
I keep my personal code libraries on CPAN. I'm not even sure how I'd do this in other languages anymore. It's just too integrated in the way that I think about programming now.
For my PHP work I started with a small file of simple things: a mail function that checks inputs for header attacks, and email validator, an input srubber, that type of thing. Over time it has grown into a application framework for quickly developing one off applications that can be templated by our graphic designer.
I have a library that i use quite extensively. I started fresh with c# and kinda threw all of the legacy stuff out the window. I find them very handy and i rewrite/refactor them often (some of them). Some of the stuff i have is:
Auxiliary (things like IsRunningLocal, InternetDetection)
Standard Classes or Structs for: Address, CreditCard, Person
I have .dll's for both win and web stuff, some very logical like a .dll for shopping cart stuff
I wrote a quick and simple library in Java which I can add code snippets to. I plan to extend it to a full framework for development at some point but only when time allows. I have all sorts in there from simple functions to full blown pages and features. Its so helpful to have when developing because as a web designer, all I need to do is change the CSS of the page.

Crystalspace vs. Irrlicht vs. .....?

So, I use Linux, and I've been trying to find the time to get into game programming. I started out with Panda3d and had some pretty decent results and got a feel for many of the concepts in game programming. Not too long after that, I decided to step it up a notch and go to something more powerful and C or C++ based.
I'm probably just really dumb, but I could never really figure out how to use Crystalspace correctly. If somebody has any useful resources on how to use it, I would appreciate that. But in the meantime, I was messing around with Irrlicht and I like it, but I would like to know what more knowledgable people have to say about the subject. And maybe theres another awesome option out there I don't know about.
If you ask me, Irrlich is the best open source engine - it has clear architecture, good performance and requires lesser code to be written by programmer. I can not honestly compare Irrlicht with Crystal Space or Orge. I consider CS as mess of code, written by many different programmers in different manners - I am hard to imagine how to use it too (due to absolute lack of documentation). As for Ogre, it is not easier than D3D. I've examined different samples and fount plenty multyline fragments of code that are done with a single line in D3D. So, I simply can not see a reason, why to spent months learning OGRE's terrible API - if one has free time, I would advice to learn D3D itself.
I can say even more - Irrlicht is better, than many commercial engines, for example - Torque (absolute lack of documentation, forces to start project over existing one etc.), Truevision etc. Of course, Irrlicht lacks some great features, AAA grade engines must have, but it is quite sufficient for smaller projects.
If you have not BIG money to acquire Gamebryo and similar grades engine, I would advice to stick with Irrlicht - for first several projects at least.
I've spent some time working in the game industry. I'm also a Linux guy. I used Irrlicht to make a couple games, and used those as part of my resume, which helped get me get a job as a game programmer.
Irrlicht has a cleaner API, lower system requirements and works better across platforms than Ogre, in my opinion. I've had a blast making games with Irrlicht. It's also fairly lightweight (much lighter than Ogre), with a very open license for any use, commercial or otherwise.
Working with that engine did a lot to prepare me for working within the commercial game industry.
Ogre3D
http://www.ogre3d.org/
Is typically named together with crystalspace and irrlicht.
Ogre and Irrlicht both are said to have a cleaner design than crystalspace so I wouldn't worry to much about problems with the latter.
If you're looking for productive game development, then my best bet would be to use Unity 3D. I started off by using Irrlicht but quickly backed out because of non intuitive tools and a lot of stress on programming. Ogre seemed to be even more complex.
Unity on the other hand is rapidly gaining grounds with each release. The recent Unity 4 is packed with a ton of features. With very little game dev knowledge, I've managed to write my own flight sim engine in Unity Android. Even learned to write shaders easily.
Though advanced Unity licenses are paid, but they are well worth it. But you can always use Unity free edition to make commercial PC games. In all, game development is all about getting the hang of a game engine. Master any, and you will rule.

Resources