logo
  • Home
  • Acerca
  • Autores
  • Faq
  • Rede
  Twitter   Feed-me! RSS!
Jan 13

Depois de 6 anos de Flex, irei migrar para HTML5?

Escrito por riaPT em flash, html5, Javascript, Ria’s Geral @ 01 13th, 2012 | via http://riapt.org | Sem comentários
riaPT
? X
  • Bookmarks

Blinkbits BlinkLists BlogLines Blogmarks Buddymarks CiteULike Co.mments Del.icio.us Digg Diigo

Fark Feed Me Links Furl Google Linkagogo ma.gnolia Mister Wong Newsvine Propeller Rawsugar

Reddit Rojo Simpy Sphinn Spurl Squidoo StumbleUpon Tailrank Technorati Yahoo

More »

Regra geral não sou apologista de dispersar conteúdo, nem de fazer posts no riapt em Inglês. Neste caso em específico, visto tratar-se de um assunto que está na ordem do dia, vou abrir uma excepção e duplicar aqui um post que fiz no Google+. O endereço original é este:? https://plus.google.com/109047477151984864676/posts/CVGJKLMMehs

After 6 years doing Flex, am I moving to HTML5?

Short answer: no. But I’m investing in HTML5.
(really) Long answer: see below.

After coming back from the Flex Summit, many people have contacted me asking what was going to happen with Flex and if I was going to “migrate” our projects (like http://airgile.com ) and services to HTML5. After plenty of exchanged emails and dozens of long talks, I decided to write down and share some notes of my first steps in the HTML5 world regarding the development of Enterprise RIAs (or not). These notes are not organized, they have typos, and, as I said above – they are only my first steps so more experienced people might (and will) prove me wrong in some topics.

Background

I founded Webfuel in 2004 and since then we’ve specialized in building long-term (> 6 months) enterprise-grade RIAs that had to scale well and be prepared for constantly changing requirements with a low cost in maintainability, while simultaneously providing a top-notch user experience. We’ve managed to offer our services comfortably with a very limited number resources and small development teams (3-5 persons per project), much thanks to the way we leveraged existing knowledge on Software Engineering and applied it to our platform of choice – Adobe Flex (now fortunately called Apache Flex).
Our decision was purely technical and we have never regret our choice, until it got badly affected by the bad PR around the Flash platform.

Worse PR ever in November 2011

The Flash platform was already in bad shape, much thanks to one year of chaotic PR and there were already some inconsistent signs from Adobe. While disappointed, I was not very surprised when all hell broke loose in November 2011 with Adobe destroying the very last credibility that Flash still had, directly affecting Flex, our businesses and careers. Long story short, Adobe wasn’t able to monetize the Flash Platform and the top managers who don’t really care or understand it’s power simply decided to put the money where their mouth was: HTML5. I happen to strongly agree with the move on investing in HTML5, but they could and should have done it without destroying (the perception of) Flash. Especially because in the meanwhile it had turned into the platform of choice for Enterprise Development.

In December ’11 Adobe has donated Flex to Apache. While this might end up in being the best thing that could happen to Flex, the initial reaction from the Enterprise was that Adobe was getting rid of Flex. Like someone said during the Flex Summit – “it seems to me that Adobe has built the best platform for enterprise-grade application by accident”. Adobe understands design; creativity; marketing; publishing; Adobe doesn’t seem to understand Enterprise. Example #1: Zero Support = the biggest complaint about Adobe I heard for years on the Enterprise. Example #2: the pricing of LCDS.

Did Adobe killed Flex? No! A technology doesn’t have an heart attack and drops dead on the floor. Flex is still alive and the reasons why we chose it are still perfectly valid. Flex didn’t got worse suddenly – it’s still the same robust platform for enterprise RIA development.
What Adobe destroyed was perception of the Flash Platform. And the perception is what matters on business. You can have the best product of the world, but if people believe it’s bad they won’t buy it (and they’ll even be happy on telling everyone how much your product – that they never used – sucks). But if they think it’s good – even if it actually sucks – they’ll probably buy it (and complain later). Perception. That’s what sells. Perception.

Will the perception around Apache Flex ( http://incubator.apache.org/flex/ ) improve? Most likely, yes. In 9 days, there were more than 1.4 thousand emails exchanged on the Flex Mailing List ( http://incubator.apache.org/flex/mailing-lists.html ) ! It’s pretty impressive the number of people that are now involved in pushing Flex forward and this number will most likely keep raising. But Apache Flex still relies (or, at least for now) on the Flash Platform and I’m not seeing the bad perception on the Flash Player changing in a near future. Of course there’s still AIR, but what concerns me are browser applications

We are desktop-developers-working-on-the-web

An important side note, is that I see Webfuel as a team of desktop developers working on the web. In another words, we use desktop development paradigms, best-practices and design patterns borrowed from the JAVA world and we’ve applied them to build applications that happen to run inside the browser. Our work consists normally in building at least two loosely coupled applications, connected by an RPC API: a client application (running inside the web-browser) and a server application that only exposes services and is not aware of the client application.
Most Flex developers out there think on themselves as web-developers, but in most cases the mindset of a Flex developer is closer to a desktop developer than to a web developer. IMHO, this is the most single-most-important reason on why we, Flex developers, dislike so much the “normal” web development approaches.
We work with “views”, web developers work with “documents”. We do old-school MVC, DI, loosely coupled approaches, dependency management, RPC, code coverage, continuous integration [...], and when we’re forced to do web-development these are the first concepts that we try to investigate and replicate… before we get frustrated and enter in “denial”.
To be good at typical web-development, we have to change our mindset.

Is “HTML5″ ready?

According to Twitter, online magazines, blogs, Apple, Microsoft and even Adobe, HTML5 is the silver-bullet for everything. In can be used to build websites, webapps, games, software, mobile applications, doing laundry and cooking. The focus is all on HTML5 right now. Is it the right moment to use it?

From the point of view of a web-developer – of course it is!!! For a typical web-developer, HTML5 means more tools, more power and much better cross-browser compatibility than what they had before. If you’re working on the web, HTML5 and the storm of JS frameworks is simply the best thing that has happened to the web since…. humm… Flash. :o ) Bottom line, HTML5 is for sure a giant step forward.

From the point of view of desktop-developer-working-on-the-web – hell no! WTF? We work on the enterprise and enterprise means stability. We can’t afford to have too many moving pieces all the time. We can’t afford to deal with un-structured languages. If you’ve used Flash or Flex for the last 5 years, you’ll feel that in HTML5 there’s nothing new or better than what you already have. Worse, you’ll feel that there still are hundreds of needed capabilities and tools missing. Exception to the rule, happens if you’re targeting the browser of Mobile devices, where HTML5 is king.
It’s quite understandable that a Flex developer feels frustrated. You feel you’re going backwards 4 or 5 years. It happens that, as Ted Patrick stated ( http://tedpatrick.com/2011/11/12/living-in-the-future/ ) , we were living in the future…

Ignore the shit storm. Ignore fanboys. Choose the right tools. Ask the right questions to the right developers

People like to take sides. If I like and use something, for sure it’s because it’s the best thing ever, and all the rest sucks or is dead. That’s how it works for most fanboys.
Newsflash: if 10.000 persons say that something sucks, it doesn’t really mean that it really sucks. It means that they believe it sucks. Like they believe in a religion. The irony is that developers should be pragmatic people, but we often see them becoming fanatic about their technology choices. “Infidel, infidel”, they yell with their pitchforks in the air when you say the name of a “competitor” technology. WTF?

For me, technologies are just tools. Obviously I would like to have as many good tools as possible so I can be able to choose the right one for each task. Be it Flex, HTML5, Javascript, Actionscript, JAVA, PHP, whatever.

Bottom line: ignore the shit storm and the bad PR. Ignore fanboys. Choose your tools based on logic. You wouldn’t choose a hammer to cut wood, would you?

Last year, when I started digging seriously into Javascript, I had many questions. I took for granted that someone who defends a technology with so much conviction, probably understands it pretty well. So I placed several questions to these guys expecting to learn new stuff and understand their best practices. It happens that I haven’t learnt shit. It was like if me and them were from different planets, speaking different languages. Even similar words have different meanings (their MVC is not our MVC. their dependency management is not our dependency management… etc).

I’ve sent a couple of emails to mailing lists of HTML5 and JS development asking people what they were using for MVC, IoC, Unit Testing, Code Coverage, Compiling, Continuous Integration, etc, etc. The answers were like “WTF dude, IoC? What are you talking about?”. I now know that I was doing the wrong questions, as you’ll see below.

Since I couldn’t get (or understand) answers from the gurus of the JS world, I started trying to find people who were doing both large-scale Actionscript and Javascript. They would understand me. :o ) It happens that there aren’t many and most of them were more or less at the same point I was. The best single advice I got was: “accept web dev for what it is and don’t try to change it. Don’t do RIAs. Do simple web development. Then improve.”. Good advice!.

Redefining our focus

As I said above, technology-wise, Flex is still perfectly valid. But it’s perception is at it’s lowest level and clients are quite confused and started asking us to use HTML5 to build the same type of solutions we were building with Flex.

So we had to rethink our business, and considering our desktop-developers-working-on-the-web mindset, we’ve decided to:

  1. return to our roots: desktop development. That’s what we’re good at and we can still keep using Flex to build AIR applications, either for the desktop or mobile. Since we can embed the AIR runtime, those applications will be future-proof to any other crazy-game-changing decisions made by Adobe.
  2. increasing our investment in developing (simple) HTML(5) webapps, while accepting the web for what it is: broken. In another words, we have to be humble about what we can provide on the web. It’s too hard and expensive to build the same type of applications we were building, so we’re starting with just simple webapps.

We won’t be accepting huge enterprise-grade projects if they’re meant to be built in HTML(5). This is actually the hardest problem to manage. There are expectations from clients. They’ve got used to our beautiful RIA applications, with almost no waiting times, with beautiful and pixel-perfect interactive user interfaces. And now they want the same, but in HTML5, because Flash is “dead” and HTML5 will also run on their Mobile devices (all of them), faster and without consuming battery. At least, it’s what they heard…. The solution for this problem is to say “No, we are not ready to develop it in HTML5″. We’ll be restricting us to simpler web-apps, until we feel that we (and the web) is ready.

First steps in JS and HTML5

During 2011, I’ve read A LOT? about JS frameworks, libraries, approaches, etc. Sometimes, after finishing reading something, it was already outdated and a better library was available.

My first impression was that most docs were “meh”: in most cases you have an excellent “Getting Started” guide, but as soon you start getting your hands dirty in more complicated scenarios, things start falling apart and you’ll see no or outdated advanced documentation.

Another trend that I hated in my readings was the lack of objectivity: instead of the typical docs saying “this framework does A,B,C,D” , I saw a lot of “THIS IS THA MOTHA-FUCKA FRAMEWORK THAT WILL SAVE UR LIFE!”, “MEGA-HYPA-SHIZZLA-FRAMEWORK”. Feels awkward.

I’ve also seen several frameworks being dropped in favor of others, which was actually what scared me the most. I felt insecure choosing the “right” libs and frameworks, so most choices I did at start were the safe ones, as you’ll see below.

Another irony was that most of the JS frameworks exist to overcome the limitations of the web development (normally, the crossbrowser issues). Coming from an environment where a framework tries to abstract application concepts, it felt weird to me to use frameworks to abstract technical limitations. Today, I’ve learnt to enjoy and welcome these frameworks. Accept them for what they are, because the technical limitations actually exist? and without those frameworks you’re screwed.

In October 2011, I decided to start a medium sized real-life HTML5 webapp with a partner company, so we could test the knowledge I gathered. (A medium-sized project in the point of view of a web-developer; as a desktop-developer I see it as simple stuff #notbeinghumble? ). I’ve allocated two developers to the project – being myself one of them. Below are the choices we did.

Knockout.js

Despite having read about Backbone, Spine and other complicated frameworks, I’ve decided to start small and simple with Knockout.JS . I just wanted simple data-binding to start with, so I could get some separation between the data model and the view. Later, when we were more experienced, I would re-evaluate the choice of the framework and choose between Backbone, Spine, or another.

My choice has proven to be worthy since Knockout is actually quite simple – but far more complicated and intrusive than the ultra-easy and powerful binding we’re used to in Flex.

The documentation of Knockout is quite good, with plenty of tutorials available. On Google you won’t find as many resources on Knockout as you would like, but fortunately the website covers most of the important topics. The mailing list is pretty good, despite not being as active as the MLs I’m used to in the Flex world with dozens or hundreds of experts. Anyway, in the Knockout ML, there are always one or two persons kind enough to point you on the right direction, which is great.

jQuery

I had already a good impression on jQuery, but even still it turned up to be even better than what I expected. jQuery not only hides a lot of the crossbrowser issues – not all -, but also boosts up a lot your productivity with dozens of shortcut functions to most of the stuff people normally need to do on the web. Use it (can you live without it?).

SaaS

Managing CSS can easily turn into a pain especially if you need to do many changes to an existing stylesheet with hundreds of CSS declarations. When Googling for best practices, I met SaaS. SaaS is actually pretty simple: it let’s you define CSS stylesheets with declaration hierarchy, variables and mathematic expressions, saving them on a scss file. Then you start a command line task that listens to changes to your scss file and converts it to a CSS file on the fly.

I haven’t looked at Less, so I don’t really know which one is better.

Lab.JS

I also discovered (in the hard way) the pain that it can be to manage dependencies in Javascript. I was used to having all class definitions packaged for me in a single SWF and the Flash VM would take care of embedding and managing dependencies for me (pretty most like all bytecode VMs do). In the Javascript world, there’s nothing taking care of this for you. You start by setting in the HTML file the location of the scripts needed, but then you cannot control the order they are loaded and run. So you can be calling a function myFunction() in fileB.js that was defined in fileA.js that was not loaded yet – resulting in errors.

I’ve chosen Lab.JS to solve the issue of loading dependencies on the right order. I’m also making sure that any initialization code only runs AFTER all the needed files are loaded.

I’ve found a problem with Lab.JS: if your code throws exceptions, they will be swallowed by the library and nothing happens. My workaround (read: ugly hack) was to do a ” setTimeout(initialize, 1); ” after the scripts are loaded. This way exceptions are now caught by the browser, as you would expect.

IDEs

This was one of the biggest disappointments at the beginning. The biggest problem of JS is that due to it’s dynamic nature it’s hard to be tooled around. For building large scale complex systems, especially in a team environment, I needed good refactoring capabilities. It happens that refactoring doesn’t exist in the IDEs I tried.
Ok, there is something called “rename” in WebStorm but it works for very simple cases and I’ve seen it resulting in unexpected results (so I always use the “preview”).

Flash Builder is a complete beast (in a good sense). I’ve seen many people ranting on Flash Builder and even I had some disappointments a couple of years ago. But after FB 4 it just got awesome, with it’s serious refactoring capabilities, find usages, metadata completion, autocomplete, inline docs, content assist, etc. Most of the best tricks from the JAVA world are available on FB. If you expect to find those in JS editors, I have bad news for you.

I’ve started with Aptana. It’s free. It’s based on Eclipse, so I felt at home at least with the shortcuts and the structure of the IDE, but with a black editor (wtf? is this the “fashion-color” for supa-dupa-web-developers?). Anyway, after two months I got tired of it. I couldn’t do refactoring. I couldn’t jump properly to a function definition with CTRL+click (and this was REALLY annoying). It didn’t have decent auto-complete. I’ve tried making the debugging work but it only worked properly 15% of the time.

Then I’ve decided to give PHPStorm a try – which is the same as WebStorm, but also supports PHP. At first, I was scared: I couldn’t find half of the stuff I needed. After one day, I was pretty comfortable with it and now I feel it’s actually pretty well built. Ok, it’s NOT Eclipse, but even still it’s quite powerful. What those guys did was to implement really well? the things you use most while developing and packaged all of them in a clean and objective interface. Kudos to JetBrains ( http://www.jetbrains.com/ )!
In PHPStorm, refactoring “sorta” works in simple scenarios. If you complicate too much (like when you try to mimic packaging for your objects), it won’t work. Click and jump to a function definition works. Debugging… works!! Autocomplete works a lot better than I expected. Actually, it works quite well. The catch: comparing to Aptana, it’s not free.
Coming from Flash Builder, will you be happy with PHPStorm? No. But currently it seems to me that it is probably the best IDE for Web development.

Debugging

I feel ashamed to say that I couldn’t debug properly during the first two to three weeks. Every tool I tried didn’t work as expected. It happens I was using the wrong tools, browsers and approaches.
I ended up using the debugging capabilities of both Firebug (in Firefox!) and PHPStorm. Firebug is also pretty helpful to inspect the DOM of the document, something you’ll be doing every 5 minutes. Both Firebug and PHPStorm allow you to place a breakpoint in JS code and then run your code step by step, as expected. PHPStorm looks more comfortable to me, also because it’s where I’m writing my code.
Bottom line: If your debugging is not working, don’t blame JS: you’re simply using the wrong tools.

Javascript

This was probably my biggest pain point. I’ll start with the conclusions: accept Javascript for what it is and don’t try to mimic your common OOP techniques and classes. There.are.no.real.classes.in.javascript.
Of course, you can try? to mimic them – I’ve read half of a book teaching how to do that. But I’ve come to the conclusion that the complexity that you’re adding to get you closer to your comfort zone ends up not being comfortable at all…
You have objects in Javascript. Some might argue that they’re not “real objects”, but wtf, they are what they are and bitching around all the time won’t turn them into real objects. They are objects. Its the definition of “real” that is subjective :o )

The problems with JS:

  • Silent errors. They happen. Get ready for them.
  • Hard coupling everywhere. It’s pretty hard to do loosely coupled architectures. It’s quite easy to end up with a web of dependencies between different objects. I’ve read there are techniques to avoid hard-coupling, but I haven’t had time to dig up more, so this might be my fault.
  • Uglyness. I’m used to a HUGE-ULTRA-CLEAN separation between classes, libraries, modules, components and applications. In the webdev world, get ready to see PHP spitting HTML with JS that spits more HTML… Or function a() that creates another function in object b, that knows about object c and changes how c behaves. Things like that. In many known js libraries.
  • It’s not built for team work. At Webfuel we normally don’t need to talk much with each other about development. Half a dozen guys can be working together for half a year on the same project, commiting code every 5 minutes to the same SVN, without breaking the code of others. This was quite easy to achieve much thanks to the structured nature of Actionscript, on top of some very simple practices borrowed from the JAVA world. Enter Javascript and you’ll see your code breaking the code of someone else. While developing JS in a team, it’s normal that developers need to talk a lot about what each one is doing, warning the other to be careful about X or Y, or asking the other “where did you put the code for…”. Actionscript makes teamwork a joy almost since moment zero – there’s no rocket science for a healthy teamwork environment. In Javascript, the trick is to put people working in very different unrelated parts of the projects and use techniques to encapsulate their code – I have yet to learn them, but I will soon. I’ve asked some JS developers about this but the ones I know are all lone-wolves so they didn’t understand what I was talking about (apart from the reaction “SVN?? WTF?? Use GIT!”.. hum… that wasn’t my question…)
  • Unpredictable. In AS3, the “this” refers to the instance where the method is defined. In JS, “this” can mean pretty much anything (remember AS2?). This was one of my biggest pain-points at first. Another problem is guessing by looking at the code the properties and functions of an Object. You can’t. A function in an object can be defined pretty most anywhere. It’s up to you (and your team; and your partners; and your library-providers) to make sure that you keep your house clean with everything organized in the right place.
  • Code practices. These are completely different from everything you know. I taught everyone here at Webfuel to not be afraid of writing many lines of code. I want them to write self-explanatory code, like if they were writing English. Enter Javascript. And cry. By some weird reason, people like to write as much code as possible in a single line, making it not only very hard to read, but also very hard to maintain. I’ve got used to seeing the #(‘huge’).line(of: code, that: function() looks() ).like(‘a’).train(); . And this practice is everywhere, pretty most all examples, libraries and worse: in books! One of the books I read had one line that took me around 5 minutes to understand! The fun part is that I had the book with me in San Francisco on the Flex Summit and I showed that line of code to several people just to scare the shit out of them. It worked!

Bottom line: if you’re a OOP purist, with many years of experience on software engineering on Flex and/or JAVA, you’re going to be scared. The mindset is different. The problems are different. The solutions are different. Even the slang is different. The good part: no compiling times. Which is actually a very good part…

There’s so many people betting in JS, shouldn’t it be good?

This is actually the question that confuses me the most. I simply don’t have an answer… Some people seem to be able to pretty much do anything they need. But at the same time the language certainly has it’s fundamental problems that can scare the shit out of you if you’re doing a one-year-project.
One thing is for sure: it’s being pushed forward and you can’t deny that.

CoffeeScript

I haven’t tried yet CoffeeScript. After reading a bit about CoffeeScript, I’ve learnt that you still need to be comfortable with Javascript to use CoffeeScript properly. And that’s what I’m doing. On the next project I might give CS (or other language that cross-compiles) a try.

Layouting and the DOM

This was actually my biggest disappointment. Flex (>4) is amazingly simple and powerful on what it comes to pixel perfect skinning and layouting. You have pretty most no constraints in Flex in what it comes to layouting, giving you imense freedom in creating perfeccionist user-experiences. You don’t think “how am I going to implement this?” because there’s not much to know with Spark skinning: it’s really powerful and simple.
The HTML world is different. You have to be aware of the constraints before creating the design and setting the user experience. I wasn’t aware of these constraints so we had to change the designs of the product we’re building a couple of times on the middle of the project to turn them into something possible/easier to achieve in HTML. I really hate constraints that end up affecting the user experience.

You have also to be prepared to accept small (and big) cross-browser rendering differences. They will happen. A lot. But that’s another topic…

Optimizations/Preloading content

Coming from the Flash world I was used to have to build one single application (the SWF) that has all (static) assets embedded. This results in pretty small files (yes, a SWF is smaller than it’s HTML+JS+CSS+Assets equivalent, even after minimization and gzip, and etc), only one request to the server (which results in a very low load on the server), and the assumption that all the content you need is available at runtime since moment 0. If you want to achieve a similar result in JS, you have to do it by hand – there’s nothing taking care of that for you. You have to join and minify Javascript and CSS files and resort to image sprites to reduce the number of requests to the server and the user perceived speed.

An image sprite is simply one PNG file with all the images and icons you use in your webapp. Then you simply apply that image as the background image of your UI component, using CSS to set a translation so it shows the icon/image you need. It’s quite simple, but make sure you load this image before your content appears on screen. The same applies to other content, in case you don’t want the user to see “glitches” on the layout while things load.

During loading I am hiding most divs (display: none) in the DOM, showing a preloader and after all content is ready (JS files through Lab.JS, Image Sprite, etc), I’m using jQuery to show stuff. It’s quite simple, actually, but of course, Flex did take care of all that for you… BTW, I saw this today, but I haven’t tried it yet: https://github.com/thinkpixellab/PxLoader

I’ve started today looking for a Javascript minifier. I need something that can automatically watch a folder with several JS files and merge them in a single minified file. If possible, assigning a revision number to the generated file. I haven’t yet found anything, but I’ll update this post if I have positive results.

HTML(5), JS and Mobile

If you think you’re going to build something in HTML(5)+JS that will work seamlessly and without problems in desktop AND mobile browsers, think again. Document based websites usually work without problems on both types of environments. But if you’re doing a more or less advanced user experience that relies in some CSS and JS magic, then be prepared to be disappointed when you open your content in your Mobile device. Not that the mobile browsers are bad – they’re actually pretty good. The problem is that the Mobile experience needs to be thought from the start – people will be using their huge clumsy fingers to interact, the screen will be smaller and the hardware resources are more limited. So at the end, you have to implement at least two different user experiences and switch between them according to the device capabilities using Media Queries. I haven’t yet tried Media Queries, so there’s not much I can say about this. I just mentioned this topic because I’ve seen several people migrating their Flash applications to HTML expecting them to work right away on iOS – without thinking that it’s probably cheaper to keep the Flash version on the desktop and building a dedicated version for iOS.

UI Components

DateChooser, NumericStepper, TextInput, DropDownList, RadioButton, Panels, Accordions, HGroup, Charts, Lists with Renderers, DataGrid, etc, etc, etc, almost all types of components you can imagine are available in Flex. And they are extendable and completely skinnable. You have great control in your hands. In the HTML world, either you go with the limited browser components – that are not extendable and are hard to skin but they integrate with the browser and the device -, or you have to choose a component library like jQuery UI, ExtJS or zkoss, among other – that are more or less powerful, but don’t integrate with the browser or device.

After exploring dozens of options, all of them with their cons and cons, I felt unsecure on choosing one option, spending time and money learning it and teaching it to my team, to later conclude that I might have chosen the wrong one. So I’ve decided NOT? to try any component library – apart from the limited jQuery UI -, simply because there are too many things changing right now and it’s very hard to predict which libraries will succeed and which ones will not. I’m going to be lazy (also because I can’t study thousands of stuff at the same time) and wait to see what other Flex developers will choose. In the meanwhile, as I said above I won’t be using HTML(5) to build RIAs, but only simple webapps. And for that, jQuery UI is up to the task (with some quirks here and there).

Crossbrowser issues

Heck, this is my biggest nightmare. I tremble everytime someone says the world “web browser”. Ok, I’m exagerating a bit. Crossbrowser issues exist, they are a PITA and they will consume at least? 30% of your time in a project. But to be honest, at first I was expecting it would be a lot worse. Don’t take me wrong here, crossbrowser issues are? a nightmare. Simply, they’re not as scary as I thought. If you follow me on twitter ( https://twitter.com/#!/joaosaleiro ) you’ve probably seen me cursing some web-browsers (hint: has two letters, starts with an I, ends with an E). Get ready to having to test something in several browsers and to change plans in the middle of the project because your approach doesn’t work as expected in one or two major browsers – especially if you’re building edge-cases and using HTML5 stuff.

You can’t miss this article: http://www.joelonsoftware.com/items/2008/03/17.html

We had one crossbrowser issue this week that almost killed our current project. We needed to override the browser URL while the user was navigating the application and we couldn’t rely in simple URL hashes. We were hoping that history.pushState was up the task, but it happens that it is not. Erratic behavior in Safari, doesn’t work in IE, worked in Android until 2.3.3 and stopped working in 3.0 and 4.0 (WTF?)… Fortunately, I’ve found History.js which was built exactly to fix our problem and reduce (not fix) the cross-browser issues. See, the good thing is that crossbrowser issues happen to everyone, so you’ll likely find a workaround on the web.

If you’re doing HTML5 you probably know about http://caniuse.com/ . If you don’t, go there.

Productivity

Our productivity is pretty bad right now – but we are getting better! We’ve spent 11 weeks of two resources to build something in HTML(5)+JS that we would have built in 3 weeks with the same resources in Flex, without any stress at all. Of course, I take a big part of the guilt here: we’re still learning and during the first weeks there were a lot of readings, plan changes, tests and bumps on the road.
The real issue is how tight the relation between productivity and your experience with the tech is: the bumps on the road are there, they happen to everyone and you won’t be able to predict them, so the only solution is be experienced and be aware of those issues. They will simply happen, you’ll curse them, search the internet for hours, fix/hack them and the next time you’ll meet them, THEN, you’ll be ready and productive.
You’ll end up implementing workarounds and hacks (on top of other hacks) constantly. Coming from the Flex world, you’ll feel ashamed of your hack – don’t be. It’s normal. Most of the times, you won’t have another choice but to accept the hack and move on.
Coming from a rapid development environment as Flex, productivity in JS and HTML can be quite frustrating until you get used to the bumps on the road. After you’re experienced, it will get better, but I don’t expect it to come any close to Flex development in a near future.

Conclusions

The first conclusion is that we’ll keep using Flex in long-term enterprise RIAs projects. Neither the open-standards nor we are ready to build the same type of experiences that our clients expect us to do.

At the same time, we’ll be accepting smaller webapps. At this point, after three months, we’re already pretty comfortable building web experiences, so it’s a matter of raising the bar slowly, webapp after webapp. But I don’t think we’ll be able to do the same type of RIAs we were doing with Flex at least in the next two years. Also, maintainability and it’s cost scares the shit out of me. And all the moving parts of HTML5 – new libraries appearing, others disappearing, browsers dropping support of features, etc. There are lots of “ands”.

I know I’ve missed a half a dozen topics above and I know I’ll have dozens of other topics to write about in a couple of months. Actually, there are no real conclusions here – only open subjects. There’s much to be investigated and learnt. I’m sure I’m not completely right in some of the above topics and I would love to get your feedback, pointing me on the right directions where I got it wrong. I can only hope that most of the stuff I pointed above won’t look as bad in a couple of months as it looks now. Or that browser vendors shake hands and decide to stop fragmenting the web. Maybe they could all be friends and adopt the same rendering engine and VM (_giggles_). For example, Google Dart. (_yeah, right_…)

Original post:? https://plus.google.com/109047477151984864676/posts/CVGJKLMMehs? (please try to keep comments on the original post, of possible)

Jan 3

SharedObject com Flash Media Server

Escrito por Leonardo França em .NET, 1, 2.0, 4, 6, action, Actionscript, ActionScript 3, Actionscript 3.0, Actionscript3, Adobe, Air, Aplicativos, app, AR, BI, botão, browser, C#, class, cliente, código, Cookie, Curso, dados, demo, Download, err, event, EventListener, events, exemplo, Ferramenta, filter, flash, flash media, Flash Media Server, Flash Player, Flex, FMS, function, Geral, git, Google, handle, html, ide, IE, if, image, instalação, int, live, mg, O, on, Outros, Partilha, player, pt, referencia, RIA, Ria’s Geral, RTM, RTMP, S+S, server, servidor, swf, TAT, UI, uint, update, Ved, web, window @ 01 3rd, 2012 | via http://www.leonardofranca.com.br | Sem comentários
Leonardo França
? X
  • Bookmarks

Blinkbits BlinkLists BlogLines Blogmarks Buddymarks CiteULike Co.mments Del.icio.us Digg Diigo

Fark Feed Me Links Furl Google Linkagogo ma.gnolia Mister Wong Newsvine Propeller Rawsugar

Reddit Rojo Simpy Sphinn Spurl Squidoo StumbleUpon Tailrank Technorati Yahoo

More »

SharedObject é um recurso que dar ao Flash Player a capacidade de salvar dados localmente para poder ser usado posteriormente em sua aplicação, a grosso modo é como um cookie. Com o Flash Media Server, foi introduzido a possibilidade de usar o SharedObject Remote, no qual os dados são salvos no servidor Flash Media Server e compartilhados para todas as instâncias de uma conexão entre o Flash Player e o Flash Media Server. Isso possibilita a criação de aplicativos em real time como Dashboards, chats e o que mais a imaginação permitir.

O uso do SharedObject Remote pode ser usado de duas maneiras em conjunto com o Adobe Flash Media Server.

  • Somente pelo lado cliente, através do Flash Player/AIR
  • Em conjunto com ActionScript Communication, linguagem de servidor do Flash Media Server

Vejamos o primeiro caso:

Através do lado cliente, através do Flash Player/AIR

Caso você não tenha conhecimento para usar a linguagem Server-side do Flash Media Server, é possível utilizar o SharedObject Remote somente pelo ActionScript 3.0. Vamos a um exemplo clássico sharedBall, onde o objetivo é compartilhar as posições da bolinha a atualizar nos outros clientes conectados a mesma instância.

  • Vá até o diretório de instalação do Flash Media Server e procure pela pasta “applications”, lá crie um diretório chamado “sharedBall”, dentro dele um arquivo chamado “main.asc”
  • Abra o main.asc no seu editor de textos de preferencia ou pelo próprio Flash e digite: trace(“sharedBall…”);
  • Vamos testar esse arquivo, abra o console do Flash Media Server, geralmente fica localizado no diretorio de instalação/webrrot/swfs. Você pode abrir pelo browser ou o swf diretamente.
  • Clique no botão “View Applications” e em seguida procure o nome “sharedBall” no combobox logo no canto inferior esquerdo onde está escrito “New Instance…”
  • Selecione “sharedBall” e deveremos ter na aba Live Log algo como na imagem abaixo:

  • No Flash, criei uma bola com as ferramentas de desenho e converti para MovieClip dando o nome de “mc_ball”.
  • Estamos prontos para começar a integração entre o Flash e o Flash Media Server. Crie um layer para o ActionScript e abra o editor apertando F9 ou “Window->Actions”
  • Nosso código começa com a conexão com o servidor Flash Media Server
PLAIN TEXT
ACTIONSCRIPT3:

  1. import flash.net.NetConnection;
  2. import flash.events.NetStatusEvent;
  3. var nc:NetConnection;
  4. function init():void
  5. nc = new NetConnection();
  6. nc.addEventListener(NetStatusEvent.NET_STATUS, handlerNetStatus);
  7. nc.connect(“rtmp://localhost/sharedBall”);
  8. function handlerNetStatus(evt:NetStatusEvent):void
  9. trace(evt.info.code);
  10. init();

Feito isso, podemos testar o swf apertando Ctrl+Enter, se tudo correr bem, deveremos ter a seguinte mensagem no output do Flash:

NetConnection.Connect.Success

Com a conexão feita, podemos instanciar o nosso SharedObject Remote para compartilhar as posições de x e y da bolinha.

PLAIN TEXT
ACTIONSCRIPT3:

  1. if(evt.info.code == “NetConnection.Connect.Success”)
  2. so = SharedObject.getRemote(“so”,nc.uri,false);
  3. so.addEventListener(NetStatusEvent.NET_STATUS, handlerNetStatus);
  4. so.addEventListener(SyncEvent.SYNC, handlerSync);
  5. so.connect(nc);

O handlerSync é responsável por atualizar os dados de x e y pegaremos do SharedObject Remote:

PLAIN TEXT
ACTIONSCRIPT3:

  1. function handlerSync(evt:SyncEvent):void
  2. mc_ball.x = so.data.x;
  3. mc_ball.y = so.data.y;

Daremos a opção de ao clicar na bolinha, que ela possa ser arrastável, em seguida atualizaremos as posições de x e y no SharedObject Remote:

PLAIN TEXT
ACTIONSCRIPT3:

  1. mc_ball.addEventListener(MouseEvent.MOUSE_DOWN, handlerSharedBall);
  2. mc_ball.addEventListener(MouseEvent.MOUSE_UP, handlerSharedBallOut);
  3. function handlerSharedBall(evt:MouseEvent):void
  4. this.addEventListener(Event.ENTER_FRAME, update);
  5. mc_ball.startDrag();
  6. function handlerSharedBallOut(evt:MouseEvent):void
  7. mc_ball.stopDrag();
  8. function update(evt:Event=null):void
  9. so.setProperty(“x”,mc_ball.x);
  10. so.setProperty(“y”,mc_ball.y);

Segue o código completo:

PLAIN TEXT
ACTIONSCRIPT3:

  1. import flash.net.NetConnection;
  2. import flash.events.NetStatusEvent;
  3. import flash.net.SharedObject;
  4. import flash.events.SyncEvent;
  5. import flash.events.MouseEvent;
  6. import flash.events.Event;
  7. var nc:NetConnection;
  8. var so:SharedObject;
  9. function init():void
  10. nc = new NetConnection();
  11. nc.addEventListener(NetStatusEvent.NET_STATUS, handlerNetStatus);
  12. nc.connect(“rtmp://localhost/sharedBall”);
  13. function handlerNetStatus(evt:NetStatusEvent):void
  14. {
  15. trace(evt.info.code);
  16. if(evt.info.code == “NetConnection.Connect.Success”)
  17. so = SharedObject.getRemote(“so”,nc.uri,false);
  18. so.addEventListener(NetStatusEvent.NET_STATUS, handlerNetStatus);
  19. so.addEventListener(SyncEvent.SYNC, handlerSync);
  20. so.connect(nc);
  21. }
  22. function handlerSync(evt:SyncEvent):void
  23. mc_ball.x = so.data.x;
  24. mc_ball.y = so.data.y;
  25. mc_ball.addEventListener(MouseEvent.MOUSE_DOWN, handlerSharedBall);
  26. mc_ball.addEventListener(MouseEvent.MOUSE_UP, handlerSharedBallOut);
  27. function handlerSharedBall(evt:MouseEvent):void
  28. this.addEventListener(Event.ENTER_FRAME, update);
  29. mc_ball.startDrag();
  30. function handlerSharedBallOut(evt:MouseEvent):void
  31. mc_ball.stopDrag();
  32. function update(evt:Event=null):void
  33. so.setProperty(“x”,mc_ball.x);
  34. so.setProperty(“y”,mc_ball.y);
  35. init();

Veja uma demostração em funcionamento:

Download sharedBall

Nov 30

Livro Dominando Flex Mobile lançado e Promoções em todo o site

Escrito por Daniel Schmitz em 1, 2.0, 4, 6, aprender flex, BI, builder 4, C#, class, flash, flash builder, Flash Builder 4, Flex, IE, image, Livro, Livros, mg, mobile, NaN, O, on, Ria’s Geral, S+S, Sem categoria, UI @ 11 30th, 2011 | via http://flex.etc.br | Sem comentários
Daniel Schmitz
? X
  • Bookmarks

Blinkbits BlinkLists BlogLines Blogmarks Buddymarks CiteULike Co.mments Del.icio.us Digg Diigo

Fark Feed Me Links Furl Google Linkagogo ma.gnolia Mister Wong Newsvine Propeller Rawsugar

Reddit Rojo Simpy Sphinn Spurl Squidoo StumbleUpon Tailrank Technorati Yahoo

More »

Aproveitem o lançamento do livro Dominando Flex Mobile no mesmo dia de lançamento do Flash Builder 4.6. Além disso, todos os nossos livros estão em promoção! É a chance definitiva de aprender Flex. Aproveite, a promoção é por tempo limitado!

Acessem http://www.danielschmitz.com.br

Nov 25

Voltando ao mundo HTML+JS e agora?

Escrito por Erko Bridee em 1, 2.0, 2009, 3d, 4, 6, action, Adobe, Adobe Flex, Air, api, aplicacao, app, AR, Arquitetura, auto, back, BI, blog, browser, C#, chrome, css, css3, Curso, Cursos, dados, demo, Desenvolvimento, Design, Dica, err, Excel, firefox, flash, Flex, fonte, fonts, for, git, Google, html, html5, ide, IE, if, int, Java, Javascript, JQuery, layout, Linux, Livro, Mate, Mercado, mg, mvc, NaN, novidade, Novidades, O, on, Pessoal, Projetos, pt, RIA, Ria’s Geral, S+S, tag, TAT, Tema, Twitter, UI, UX, vs, web, web design, XP @ 11 25th, 2011 | via http://blog.erkobridee.com | Sem comentários
Erko Bridee
? X
  • Bookmarks

Blinkbits BlinkLists BlogLines Blogmarks Buddymarks CiteULike Co.mments Del.icio.us Digg Diigo

Fark Feed Me Links Furl Google Linkagogo ma.gnolia Mister Wong Newsvine Propeller Rawsugar

Reddit Rojo Simpy Sphinn Spurl Squidoo StumbleUpon Tailrank Technorati Yahoo

More »

N?o adianta chorar o leite derramado, depois que a Adobe lan?ou as ?ltimas not?cias vemos que o mercado indo de vez para o HTML5 e n?o adianta reclamar, daqui para frente mais projetos ir?o demandar conhecimentos em HTML5 (novas tags), Javascript e sobre as novidades do CSS3.

Voltando ao mundo HTML teremos que voltar inevit?velmente ao uso do Javascript, mas ao menos a boa not?cia hoje ? que diferente de anos atr?s temos dispon?veis boas bibliotecas javascript para nos ajudar na dif?cil tarefa de fazer uma aplica??o (que tente) funcionar em todos os principais web browsers do mercado (Google Chrome, Mozilla Firefox e o tem?vel IE)

Quanto ao Javascript, hoje pelo que tenho visto ? quase imposs?vel se falar em javascript sem associar ao JQuery, que ajuda muito a criar um c?digo mais limpo e organizado e at? podemos dizer, sofrer menos com o uso do javascript.

Sobre Javascript e JQuery recomendo os respectivos materiais para observar:

The JQuery Essentials

Aos que ficaram interessados pelo JQuery o @bielversallini mandou uma dica muito boa de curso web de JQuery, o jQuery Air, tamb?m jQuery Fundamentals e Livro fundamentos de jQuery 100% traduzido para pt-BR

jQuery Proven Performance Tips & Tricks, 2011

Confesso que desanimei ao ver esta apresenta??o, pois basicamente todos os recursos que gostei no JQuery s?o os mais lentos e recomendados para que n?o sejam usados a menos que n?o haja outra alternativa ou extremamente necess?rios.

jQuery & Responsive Web Design

Excelente dica de como projetar uma p?gina/sistema que se adeque as dimens?es dispon?veis (por alguns este recurso ? chamado de layout fuido/adaptativo). Como estou falando sobre layout recomendo olhar tambem o Knockout.js que possui recursos interessantes para auxiliar na defini??o da view.

Agora para falar a verdade mesmo o melhor material sobre desenvolvimento HTML+JS que vi que o autor foi real e sincero sobre o tema ? o respectivo abaixo:

Taking JavaScript Seriously (feat. Backbone.js)

Como ? dito nos slides, o javascript n?o ? a melhor linguagem do mercado, ela foi escrita em 10 dias, possui muitas defici?ncias, mas temos que aprender pois n?o temos nenhuma outra op??o.

Outro detalhe que me chamou aten??o e achei muito ?til foi a apresenta??o do Backbone.js como uma alternativa para suprir a necessidade de organizar o c?digo em algo que tenta ser o mais pr?ximo poss?vel do MVC.

Mas e sobre arquitetura aplica??es de larga escala? Bom recomendo observar este material abaixo, o qual indica as boas prat?cas de mercado e atuais recursos dispon?veis:

Large-scale JavaScript Application Architecture

Cheguei at? esta apresenta??o atrav?s deste post.

Aten??o este texto a seguir expressa minha oponi?o pessoal

Sinceramente esta apresenta??o foi o santo gral da agonia, pois para mim se trata de uma regress?o tecnol?gica brutal, irei mudar esta minha opini?o no dia em que, eu consiga ter uma arquitetura com um mesmo n?vel que possuo hoje com Adobe Flex + Swiz, como a descrevi neste post, quando este dia chegar (se ? que vai) irei dizer que podemos ent?o come?ar a pensar em utilizar o HTML+JS para solu??es corporativas.

E vamos a luta, retornando ao velho mundo do HTML, por alguns chamados de revolucion?rio mundo do HTML5…

Tweet

Veja também:

  • [Canvas vs. Flash] Butterfly 3D (Canvas + JavaScript)
  • [Adobe Flex] Definindo o foco na aplicação
  • Moto elétrica da Mavizen atinge 210 Km/h e vem equipada com Linux e WiFi
  • Elly Tran Ha, sexy blogger do Vietnã
  • FontStruct : precisa de uma fonte diferente?
Nov 23

BumbAUG – Adobe User Group do Maranhão

Escrito por Willian Mano em 1, 4, 6, Adobe, Adobe User Group, AR, arte, AUG, BI, blog, C#, class, Desenvolvimento, Diversos, flash, Flex, framework, futuro, int, Introdução, mg, mobile, O, on, Palestra, Palestras, Pessoal, Plugin, Ria’s Geral, S+S, TAT, Tema, Twitter, UI, User Group @ 11 23rd, 2011 | via http://blog.willianmano.eti.br/ | Sem comentários
Willian Mano
? X
  • Bookmarks

Blinkbits BlinkLists BlogLines Blogmarks Buddymarks CiteULike Co.mments Del.icio.us Digg Diigo

Fark Feed Me Links Furl Google Linkagogo ma.gnolia Mister Wong Newsvine Propeller Rawsugar

Reddit Rojo Simpy Sphinn Spurl Squidoo StumbleUpon Tailrank Technorati Yahoo

More »

Logo BumbAUG

Olá pessoal, venho através desse post fazer um convite ? todos vocês.

Recentemente nós aqui do maranhão fundamos um adobe user group o BumbAUG (Bumba meu boi + AUG) e gostaríamos de lhe convidar a fazer parte desse grupo.

Inicialmente nós iremos tratar principalmente o desenvolvimento de aplicações mobile sejam utilizando o flex, PhoneGap ou mesmo nativamente. Poderemos também fazer algo de introdução ao Flex Framework, mas isso é projeto futuro.

Apesar de ainda estar engatinhando nós do BumbAUG realizamos no dia 18/11 o Flash Mobile Day Edição São Luís, onde tivemos palestras das mais diversas áreas.

Acessem o grupo, participem, deixem suas idéias e contribuição. Como eu já falei é um GRUPO de estudos, então se você tiver um tema para palestrar, sinta-se ? vontade. O espaço é seu.

O Rafael Laranjeiras já marcou 2 palestras muito interessantes e em breve eu irei divulgar os temas para vocês.

Acessem: http://bumbaug.groups.adobe.com e vamos levar o desenvolvimento de aplicações ? um novo patamar.

Post to Twitter

Nov 23

Flash Mobile Day Ed. São Luis

Escrito por Willian Mano em .NET, 1, 2.0, 4, 6, Air, Android, Aplicativos, app, app store, AR, BI, C#, class, Design, err, event, Evento, flash, flash builder, Flex, for, int, interface, internet, mg, mobile, O, on, Palestra, Palestras, problema, problemas, processo, programação, redeRIA, RIA, Ria’s Geral, S+S, TAT, Twitter, UI @ 11 23rd, 2011 | via http://blog.willianmano.eti.br/ | Sem comentários
Willian Mano
? X
  • Bookmarks

Blinkbits BlinkLists BlogLines Blogmarks Buddymarks CiteULike Co.mments Del.icio.us Digg Diigo

Fark Feed Me Links Furl Google Linkagogo ma.gnolia Mister Wong Newsvine Propeller Rawsugar

Reddit Rojo Simpy Sphinn Spurl Squidoo StumbleUpon Tailrank Technorati Yahoo

More »

Flash Mobile Day

No dia 18/11 aconteceu o flash mobile day edição são luis no auditório do cecen – UEMA.

Eu particularmente estou muito satisfeito com o evento, tivemos grandes palestras com conteúdo de alto nível.

Tivemos problemas durante a manhã pois estávamos sem internet para a transmissão das palestras, porém, o evento aconteceu normalmente presencialmente.

As 4 palestras envolveram as áreas de design, programação e marketing. Bom, foi muito show.

A seguir segue o link das apresentações:

Palestra: Design de interfaces para aplicativos móveis.
Palestrante: Eduardo Gibran
Link: http://dl.dropbox.com/u/16067185/palestras_fmd/desingDeInterfaces-Gibran.pdf

Palestra: Proceso de criação. Da escolha da plataforma ? app store.
Palestrante: Willian Mano
Link: http://dl.dropbox.com/u/16067185/palestras_fmd/processoDeCriacao-Willian.pdf

Palestra: Flex para dispositivos móveis
Palestrante: Bruno Araújo
Link: http://prezi.com/klmt7jez4lfv/o-poder-do-flex-para-dispositivos-moveis/

Palestra: Marketing de guerrilha, ações virais e dispositivos móveis: o real e o virtual nas suas mãos.
Palestrante: Rafaela Marques
Link: http://dl.dropbox.com/u/16067185/palestras_fmd/marketing-Rafaela.pdf

Mais uma vez obrigado ? todos que ajudaram para que esse evento fosse possível.

Um gradecimento especial ? todos que apoiaram o evento, em especial ? RIACYCLE que através do Igor Costa nos ajudou a abrilhantar um pouco mais esse evento.

Obrigado a RINO, que, através do Odair Seixas no permitiu realizar essa versão aqui nas terras longiquas de São Luis do Maranhão.

Post to Twitter

Nov 23

Quase tudo certo para Dominando Flex Mobile

Escrito por Daniel Schmitz em 1, 2.0, 4, 6, Adobe, Adobe Air, Adobe Flex, Air, Android, AR, Arquitetura, BI, builder 4, C#, class, Componente, Componentes, exemplo, Exemplos, flash, flash builder, Flash Builder 4, Flex, for, IE, image, int, Introdução, itemRenderer, lista, lite, Livro, Livros, mg, mobile, NaN, Notícias, O, on, Outros, prova, RIA, Ria’s Geral, S+S, SQLite, Tecnologia, UI @ 11 23rd, 2011 | via http://flex.etc.br | 1 comentário
Daniel Schmitz
? X
  • Bookmarks

Blinkbits BlinkLists BlogLines Blogmarks Buddymarks CiteULike Co.mments Del.icio.us Digg Diigo

Fark Feed Me Links Furl Google Linkagogo ma.gnolia Mister Wong Newsvine Propeller Rawsugar

Reddit Rojo Simpy Sphinn Spurl Squidoo StumbleUpon Tailrank Technorati Yahoo

More »

Está quase tudo preparado para o lançamento do ebook Dominando Flex Mobile no dia 29 de novembro. Como prometido, o livro será lançado no mesmo dia que o Flash Builder 4.6 for lançado, que deve ser provavelmente agora no dia 29. Se houver atrasos perante a Adobe, nós atrasamos aqui também.

O ebook conterá 165 páginas. O preço será R$ 25,00. O formato será PDF, e vou testar o formato EPUB. Todos os exemplos do livro foram testados no Galaxy Tab com Android 2.2 e Adobe Air 3.0.

O que irei abordar:

  • Introdução ao Adobe Flex
  • Conhecendo o Flash Builder 4.6
  • Arquitetura Flex Mobile, principalmente views
  • Listas e ItemRenderers
  • Componentes Flex Mobile
  • Swiz para Flex Mobile
  • SQLite
  • Swiz + SQLite
  • Integração com dispositivo (Gestos, Acelerômetro, GPS etc)
O que não irei abordar:
  • Android/iOs Market
  • Native Extensions
Estes dois tópicos serão outros livros, pois dependem da tecnologia. A idéia é criar um “Flex Mobile para programadores Android”, contendo o Market e Native Extensions.

Nov 20

O futuro do Flash Player

Escrito por Eduardo Kraus em AR, C#, flash, Flash Player, Flex, if, image, O, player, procura, Ria’s Geral, S+S, Software, Sun @ 11 20th, 2011 | via http://blog.mxml.com.br | Sem comentários
Eduardo Kraus
? X
  • Bookmarks

Blinkbits BlinkLists BlogLines Blogmarks Buddymarks CiteULike Co.mments Del.icio.us Digg Diigo

Fark Feed Me Links Furl Google Linkagogo ma.gnolia Mister Wong Newsvine Propeller Rawsugar

Reddit Rojo Simpy Sphinn Spurl Squidoo StumbleUpon Tailrank Technorati Yahoo

More »

A imagem ao lado representa o ciclo de vida de um software. TODO software tem seu in?cio, crescimento, maturidade e por ?ltimo decl?nio at? a extin??o por completo.
Hoje um dos assuntos mais comentados ? que o Flash Player entrou no ciclo final de vida. Mais e ai, isso significa que devo hoje largar o Flex e o Flash e procurar …

Nov 16

LCCS e PHP com ZendAMF

Escrito por Leonardo França em .NET, 1, 2.0, 4, Adobe, AMF, amfphp, AR, Artigo, Artigos, C#, catch, class, classe, classes, developer, Documentação, exemplo, Exemplos, flash, Flex, Flex 4, for, framework, function, handle, image, int, Java, Javascript, live, LiveCycle, Mercado, mg, O, on, Password, PHP, player, portal, programação, pt, rest, RIA, Ria’s Geral, S+S, SDK, server, swf, Teste, try, UI, web, zend, zendAMF, zendFramework @ 11 16th, 2011 | via http://www.leonardofranca.com.br | Sem comentários
Leonardo França
? X
  • Bookmarks

Blinkbits BlinkLists BlogLines Blogmarks Buddymarks CiteULike Co.mments Del.icio.us Digg Diigo

Fark Feed Me Links Furl Google Linkagogo ma.gnolia Mister Wong Newsvine Propeller Rawsugar

Reddit Rojo Simpy Sphinn Spurl Squidoo StumbleUpon Tailrank Technorati Yahoo

More »

O Adobe LiveCycle Collaboration Service possui em seu SDK, exemplos de integração com as principais linguagens de programação web do mercado como PHP, Java, Python, etc.
Na documentação da Adobe, é recomendado o uso do AMFPHP ou o PHP puro mesmo, mas nada impede de usar tranquilamente em conjunto com o ZendFramework (usando ZendAMF)
Ryan Stewart escreveu dois artigos mostrando a implementação com PHP e REST.

  • http://ria.dzone.com/articles/integrating-php-flash
  • http://ria.dzone.com/articles/php-flash-rest

Uma observação sobre o artigo de Ryan, no Flex 4, Adobe passou a usar o swfobject, então o modo de pegar os parâmetros via URL e passar para o SWF fica desse modo:

PLAIN TEXT
JAVASCRIPT:

  1. var xiSwfUrlStr = “playerProductInstall.swf”;
  2. var flashvars = ;
  3. flashvars.roomURL = swfobject.getQueryParamValue(“roomURL”);
  4. flashvars.authToken = swfobject.getQueryParamValue(“authToken”);
  5. var params = ;

No SDK do LCCS, existe um arquivo chamado lccs.php, basta copiar para o mesmo diretório em que você já usa suas classes. Em seguida, adicionar o include no arquivo gateway.php

PLAIN TEXT
PHP:

  1. require_once ‘Zend/Amf/Server.php’;
  2. require_once ‘lccs.php’;
  3. require_once ‘Test.php’;
  4. /** Bootstrap */
  5. // Instantiate server
  6. $server = new Zend_Amf_Server();
  7. $server->setProduction(false);
  8. $server->setClass(‘Test’);
  9. // Handle request
  10. echo($server->handle());
  11. ?>

E está é uma simples classe para teste chamando o método que retorna o token para autenticação.

PLAIN TEXT
PHP:

  1. class Test
  2. private $account;
  3. private $room;
  4. private $devUsername;
  5. private $devPassword;
  6. private $secret;
  7. //$accountURL = “https://collaboration.adobelivecycle.com/$account”;
  8. private $accountURL;
  9. private $roomURL;
  10. function __construct()
  11. //for LCCS
  12. $this->account = “Your SDK account username from LCCS developer portal”;
  13. $this->room = “The room you want to connect to”;
  14. $this->devUsername = “Your LCCS developer account username”;
  15. $this->devPassword = “Your LCCS developer account password”;
  16. $this->secret = “The shared secret from the LCCS developer portal”;
  17. //$accountURL = “https://collaboration.adobelivecycle.com/$account”;
  18. $this->accountURL = “http://connectnow.acrobat.com/$this->account“;
  19. $this->roomURL = “$this->accountURL/$this->room“;
  20. public function getToken($data=array())
  21. try
  22. $this->account = new RTCAccount($this->accountURL);
  23. $this->account->login($this->devUsername,$this->devPassword);
  24. $session = $this->account->getSession($data['room']);
  25. $displayName = $data['displayName'];
  26. $username = $data['username'];
  27. $role = $data['role'];
  28. $token = $session->getAuthenticationToken($this->secret, $displayName, $username, $role);
  29. return $token;
  30. catch (Exception $e)
  31. throw new Exception($e->getMessage());
  32. }
  33. }
  34. ?>
Nov 14

#Soudevcast: Vídeo sobre as ultimas mudanças no Flex SDK

Escrito por Mario Junior em 1, 2.0, Adobe, apache, api, AR, BI, blog, C#, flash, Flash Player, Flex, html, IE, int, jandersonfc, jandersonfc.com, Links, lista, mobile, mudanças, O, on, player, POO, RIA, Ria’s Geral, S+S, SDK, Software, Twitter, UI, Vídeo, vs @ 11 14th, 2011 | via http://blog.mariojunior.com | Sem comentários
Mario Junior
? X
  • Bookmarks

Blinkbits BlinkLists BlogLines Blogmarks Buddymarks CiteULike Co.mments Del.icio.us Digg Diigo

Fark Feed Me Links Furl Google Linkagogo ma.gnolia Mister Wong Newsvine Propeller Rawsugar

Reddit Rojo Simpy Sphinn Spurl Squidoo StumbleUpon Tailrank Technorati Yahoo

More »

Alo galera! Semana movimentada né?

Bom, o Janderson (@jandersonfc) e eu conversamos rapidamente sobre o que pensamos a respeito das mudanças do Flex SDK anunciadas pela Adobe na última semana.

Segue abaixo o vídeo que gravamos – o #soudevcast -, e comentem sobre suas opiniões também, afinal, queremos saber o que voces #soudevs pensam.

Links:

a)? Lista de patrocinadores da Apache Software Foundation:? http://apache.org/foundation/thanks.html
b)? Valores que cada empresa – em sua devida categoria – paga? doa para a Apache Fundation:? http://apache.org/foundation/sponsorship.html

Conheça a Spoon:? http://www.spoon.as/
** Primeira vez que ouvi falar da Spoon foi em Agosto/2011 e foi aqui:
http://seantheflexguy.com/blog/2011/08/18/interview-with-joel-hooks-from-universal-mind-and-the-spoon-project/

*** Vídeo que eu fiz na semana passada e que o @jandersonfc se refere:
http://blog.mariojunior.com/2011/11/fim-do-flash-player-mobile-e-mudancas-no-flex-sdk/

Abraços galera!

« Entradas anteriores |

ACERCA

O que é o RedeRIA ?

O redeRIA não é nada mais que um agregador de feed's que disponibiliza o conteudo de varios blogs e autores ao redor do mundo RIA, actualmente agregamos mais de 2755 entradas vindas de 53 blogs especializados em ria’s, pelo que só fica a ganhar em assinar o feed ou seguir a comunidade no twitter.

Se acha que o seu blog ou um blog de um amigo é interessante e util para os leitores o redeRIA, faça a sua submissão aqui.

Feed: assine já
Twitter: siga-nos

GOOGLE

Votação


Deveria o RedeRia agregar conteúdo em inglês?
Ver Resultados

AUTORES


Eduardo KrausAlexandre TadashiBindableCognitiva SoluçõesDaniel LopesDaniel SchmitzDanielPedrinhaDClick TeamEbercomEdgard DavidsonElvis FernandesErko BrideeFabiel PrestesFábio Batista da SilvaFabio da SilvaFabriccio BernardesFelipe BorellaFlavia MoreiraGabriel VersalliniGabriela T. PerryIgor MusardoJanderson CardosoJoão AugustoJose Carlos FielKelps SousaLeonardo FrançaLucas MarçalLuis MessiasLuiz TarabalMario JuniorMário SantosMauro MartinsPablo SouzaPedro ClaudioreneRia BrazilriaPTRicardo CerqueiraRobson FernandesRodrigo Pereira FragaSaintBrSamuelFacchinelloSergio SouzaSilva DeveloperStefan HorochovecTech CaffeTecinforThiago BuenoVedVinícius SandimWillian ManoXAML Cast

PUBLICIDADE








Powered by Wordpress & msdevstudio.com