Photoshop, Edge Reflow and Edge Inspect: the new responsive workflow

Today I’d like to talk about something that is not strictly related to development process but that it’s very useful when you are running your company as freelance or entrepreneur or if you are team leader of a team.
One of the most important thing for me when you approach a new technology is not only understand if it could fit all your needs but also understand when you introduce in your team or company how to have the best result as soon as possible.
That’s why I keep always a lot of attention on how to create a flexible and elastic workflow that allow my team to create or modify client side solutions without waste our time.
In last years we rapidly see the grow of an hot topic, strictly related to HTML5 and Javascript, like Responsive Design, so the capability to create an interface that is viewable and usable on different devices (from smartphones to web browsers for instance).
Personally, if I didn’t find anything that help my team to be immediately very productive I usually avoid to introduce new softwares in the actual workflow, but this time we are in the middle of a big revolution where HTML5 and Javascript are the main protagonists.
During last Adobe MAX I saw a couple of interesting demo on Edge “family” and I was impressed on the capability of Edge Reflow and its interaction with Photoshop CC to create user interfaces for different devices in really few time, that’s why I was really waiting to test this feature and I’d like to share with you my first experiment.

rwdTools

Photoshop CC and Edge Reflow

I think a lot of designers create the UI for a project with Photoshop, last Monday (9th September) Adobe released an update of Photoshop CC and Edge Reflow, but we start with Photoshop because the news are really cool.
One of the most boring activity for a designer (or for me when I did it as freelance :D) is to cut all images and prepare assets in different folders for the developers.
Photoshop CC helps us introducing a new feature called Adobe Generator, a new way to automate this long and tedious phase, where the designer has only to follow some simple rules on how to nominate Photoshop levels and the software automatically export all the assets for us, ready to be delivered to the developers team!
For instance if you want to export a particular level as PNG you need only to nominate the level with a PNG extension (for example: “background.png”) and run the new Photoshop command Generate > Image Assets to have all our files ready to be added on the real project.

Photoshop Generate command

To know more about Adobe Generator and in particular to know how to set the name of each level I warmly suggest to take a look to Photoshop.com where there are all the information to do that.
Another option that we have (as you can see in the image above) is the capability to export the UI structure and the assets to Edge Reflow.
If you don’t know what is Edge Reflow I explain it in few words.
Edge Reflow is a tool useful to create responsive design layout and, from yesterday, completely integrated with Photoshop CC.
In fact now you can import in Edge Reflow your layout and you can start to customise it visually for any screen resolution your project will work.

Edge Reflow

The most interesting thing is that you can export from Photoshop an Edge Reflow project, or you can synchronise in real time the changes when the 2 softwares are open.
Then you can create your layout for different resolutions only copying and paste the code generate from Edge Reflow in your favorite code IDE; I mean copy and paste for now instead of import because probably (at 99%) you’ll have to improve or change it a little bit after paste but it’s really a good step forward for a software in preview like Edge Reflow.
With Edge Reflow you can create <div> adding box elements in your layout and you can show or hide elements present in different screen resolution simply with the options in the left side of the software interface.
Another very cool thing is the capability to work with your Typekit account (integrated in your Creative Cloud subscription) to download the fonts needed in the layout made with Photoshop.

Edge Reflow and Edge Inspect

Last but not least, Edge Reflow is integrated with another cool product of the Edge family called Inspect.
Edge Inspect is a simple application that you can add as plug-in in Chrome or you can download in your iOS or Android device from the relative store, and it allows you to test in real time all the changes you are doing in a website or more in general in HTML, JS or CSS file checking in real time the final result in one or more than one device simultaneously.
This is a capability that partially missed in the flash development workflow where the mobile test was a real pain (in particular the first releases of Adobe AIR on mobile), in this case with all those new technologies Adobe decides to evolve and improve this experience giving good tools to develop.

From a developer perspective

Personally I think that the integration of a technology like Node.JS in last Adobe softwares (Brackets, Adobe Generator, Edge Reflow and so on) is giving a real boost to them, and they are opening new horizons in the desktop application field, in particular I suggest to take a look to Node-Webkit, an open source project that allow you to work with HTML5, Javascript (Node.JS obviously) and WebGL to create desktop application for different platforms.
There are many other tools that could help to achieve the same goal like TideSDK for example, but I think Node-Webkit could be very interesting if the project will be well approach by the community.

Conclusions

Demo Photoshop and Edge Reflow

Finally the big players on the market are delivering tools that allow us to create engaging and amazing experience with HTML5 and Javascript like other technologies did in the past (Flash Platform in primis).
The combination of Photoshop CC, Adobe Generator, Edge Reflow and Edge Inspect give us a real flexible and integrated workflow where in few steps we can save a lot of hours spent on the code with great results.
Obviously those tools are new and in “preview” so they are not perfect but they are stable and useful enough at this point to be integrated in the actual daily workflow giving immediately importart results.
I really hope this is the first steps to give us the freedom to create instead became crazy to have layouts working in different browsers and devices.

Advertisement

A long weekend with Tizen, CreateJS and JQuery Mobile

Let’s start from the end of my weekend, this is what I’ve just finished:

And now it’s time to explain what there is behind.

What you have just seen is a PoC (Proof of Concept) for an application that I’ve in mind, it allowed me to study, test and having fun with different technologies, in this post I’d like to share what I’ve learnt in less than 24 hours.
I worked with different technologies as the post title suggest, I was really curios to see how I can create good application UI on Tizen OS and understand more about its limits (if there were of course) and performances.
At the beginning, I worked on the 2.5D animation where I had to scale, skew and rotate any images chosen by the user from the Gallery application.
When I started this part I tried immediately the CSS3 transitions, I thought: “They are new, so probably they care about performances on mobile!”, so after 3 hours to play with CSS3 transitions and trying to have a smooth animation on Tizen, I decide to move on Canvas!
CSS3 transitions are very good for web and desktop, but for mobile when you start to do many heavy animations they really suck, in this Tizen device (it has an hardware similar to Galaxy S3) that is so powerful everything has to work well and with them I can’t achieve my idea.

So I moved to Canvas, but I thought to find something that could help me during my “coding time” and that it feels me more comfortable so I remembered that I’ve used long time ago CreateJS for some test and in this case it helps me a lot.
When you work with CreateJS, more or less you are working with Actionscript with some small changes, for any Actionscript developer it should be a good start to move on Javascript, but there are many other options as Dart or Typescript for example that are good enough for any developer that is looking for something more than Javascript (my 2 cents).
But in this case CreateJS  helps me a lot because is highly focused on Canvas development so definitely what I was looking for.
I haven’t any trouble with this library on Tizen, the performance are so good as you have seen on the video and I didn’t write so much code, my Javascript file for the whole app is less than 260 lines, not a lot I guess.

After that I moved on and I start to work with Tizen web APIs to get images from the Gallery application.
In this case the Tizen developer forum and the online guide help me so much, in fact I found a working example in the forum that I had only to customise for my PoC.
The big issue that I found here is if I want to select more than one image, working with Gallery instance, I couldn’t do that or maybe I couldn’t find a way to do that, so I decided to create a quick picker (at the beginning of my application) to allow me to choose more than one image to the time.
To do that I had to work with filesystem APIs instead of the Gallery one, but in a while I had done everything, this is the code to retrieve all images from Image folder of Tizen OS, but you can use to retrieve any kind of files on Tizen OS:

function onResolveError() {
    console.log("error retrieve data");
}
function onsuccess(files) {
    for (var i = 0; i < files.length; i++) {
        console.log("File name is " + files[i].name + " and URL is " + files[i].toURI()); 
    }
}
function onResolveSuccess(dir) {
    dir.listFiles(onsuccess, onResolveError);
}
function openImages() {
    tizen.filesystem.resolve('images', onResolveSuccess, onResolveError, 'w'); 
}

After that I spend few hours to skin my app and get the right look and feel I had in mind with CSS and JQuery mobile and to create this post with the video.
A quick recap of my last experience:

  • on Tizen if you need to improve performances try to work with Canvas instead of CSS transitions
  • when you have to retrieve files (images, video or whatever) remember to set the right privileges on config.xml and then add the code you can find above
  • CreateJS is a really good library if you want to work with Canvas efficiently and without wasting your time
  • CreateJS has a good community and if you have a problem you can find a lot of solutions and suggestions
  • CreateJS is familiar for any Actionscript 3 developer

That’s it!
Ah, if you are asking if I changed my “religion”? Don’t worry, soon you’ll have news about Flash Platform in this blog, but sometimes I want to experiment new things.

Dart: elements iteration and CSS manipulation

In my exploration of Dart I’m trying to work in some easy examples that could help me to understand how to accomplish some tasks with this technology.
In this example I tried to understand better how iteration of elements works in Dart, how to create a layout with custom elements (more or less the same topic of a custom item renderer in Flex for example) and finally how to create some animations with CSS3 at runtime.

To accomplish those topics I decided to create a responsive image gallery that works on smartphone, tablet and web too.

image gallery with dart

Responsive image gallery

Iteration

Dart gives few opportunities to iterate trough elements:

  • with Dart language (a classic for cycle)
  • with an HTML template
  • with elements composed by an HTML template and some dart code to cover the business logic of the final element

I jump directly to the second and third method, the first one is quite easy for any developer 😉
In my sample I decide to use a simple HTML template, so basically you can define inside your html a tag <template/> that will allow you to repeat the HTML inside this tag associating it to a list for example, I give you a quick sample:

 <div id="imageCont" class="wrap">
      <template iterate="data in results">
        <div class="image">
          <img id="img_{{data[0]}}" class="faded" src={{data[1]}} width="320" height="240" on-click="onClick($event)" on-mouse-out="onOut($event)" on-mouse-over="onOver($event)" on-load="fadeIn($event)"/>
          <img id="zoom_{{data[0]}}" src="images/zoom.png" class="zoom"/>
          <h2><span>{{data[2]}}</span></h2>
         </div>
      </template>
    </div>

First of all take a look on how I can iterate this part of code; I add a simple iterate attribute associated to a list object (called results in my example) added in my dart file as a public variable.
The list could be a plain list or a list of objects, in this last case you can create multiple iteration item inside the template cycling trough your objects in the same way you have just seen.
I can substitute my data variable with any other name and I don’t need to define in my dart file, as you can see I can also define some variables inside the template getting values from my list object with this syntax: {{data[0]}} (or {{data[“value”]}} it’s the same, depends how you have create the list object).
If you need, you can also made your source variables bindable and any time you’ll change the values of your list, also the view will change the number of elements or the values showed in the HTML page.

Finally when you need to create an iterable object with a complex business logic and you want to separate from the original HTML file you can do that creating a Web Components, but in this case I suggest you to take a look to the Dart language guide that explain very well how to achieve this topic.

Modifying CSS with Dart

Another interesting topic is how to change, add or remove css styles to my DOM objects.
In Dart is so easy like any other javascript library, so basically any DOM element in Dart has a property called “classes” with its associated method add and remove, so when you want to change your CSS class with another one, you have, if you have any classes already associated to the element, remove the old class and then add the new one:

var myDomObj = query("#idObject");
myDomObj.classes.remove("class-to-remove");
myDomObj.classes.add("class-to-add");

You can also style any single property directly with “style” property and set them directly in this easy way:

var myDomObj = query("#idObject");
myDomObj.style
             ..color = "0xFFF"
             ..fontSize = "15px";

As you can see working with CSS in Dart is relative simple, if you want to take a look to the whole project feel free to download it.

Another cool thing that is so useful when you work with mobile apps or websites is to test quickly and frequently your content on the devices, so with DartIDE (you can find it downloading Dart SDK) you can easily test your content trough a web server that starts any time you are testing your app into the browser.
It’s so interesting because you save a lot of time in this way!

I’m trying to figure out right now an hypothetical workflow to create web app, web sites or any other thing with Dart and HTML5.
I believe that use Dart in combination with Edge Reflow could be the best way to create responsive application for any kind of devices, but we have to wait until the release of Edge Reflow (17th June) to know if my supposition is true or not.
When it’ll be released and I’ve few time to invest, I’ll prepare another tutorial around this workflow.
In the meanwhile I hope you are enjoying those experiments with Dart and if you are interesting in any kind of topics on Dart feel free to suggest trough a comment in this post or sending an email

Adobe AIR 3.8 introduces Socket Server on Android and iOS

Hi All,

after long time I’m back for all the developers are working with the Flash Platform right now!
Sorry for that but it was a really intensive period for me with the organization of “Having fun with Adobe AIR” so I haven’t a lot of time to share with you my new experiments.
Yesterday Adobe MAX is finished with a lots of design news, great and inspire case histories for designers and a lot of amusement during the Sneak Peek where they have shown the real power of Adobe labs with tons of really cool features that we could see in next releases of Adobe’s softwares.
For a developer perspective there weren’t big announces so, as usual, we can do it by ourselves…. and here we are!

During last few days Adobe release the Adobe AIR 3.8 and Flash Player 11.8, both in BETA but you can download and start to play with them.
When Adobe releases a new AIR SDK I always take a look to the release notes to see the new features of my favorite platform, this time I’m glad to announce that they add the opportunity to create TCP/IP and UDP socket server directly on iOS and Android.
This is a very cool feature because you can really create amazing things in particular for applications and games, for example local multiplayer, chat and so on.
I worked a lots with sockets during last years in several projects and my big concern was that I can’t create a socket server on smartphone and tablet with AIR, I could do that only with native code but I was pretty sure to see this feature will be implemented in next releases of AIR!

Today I had few time to spend experimenting new stuff so I decided to try AIR 3.8 BETA on mobile and create something cool to share with you.
As you can see in this short video I create a socket server on my iPhone 4 that interact with a client made on my iPad mini (I tried also with my Android smartphone and it works as well):


To create this sample you needn’t to learn something new, you can use the same APIs you will use on a desktop application, so to create a socket server you write those few lines of code:

//creation of a TCP/IP Socket server
private function createServer():void{
server = new ServerSocket();
server.addEventListener(Event.CONNECT, onConnect);
server.bind(7934); // this is the number of the port where your socket communicate
server.listen();
}

Then, when a client socket will join in the same network and it listens the same port of the server, the magic happens and you can start to comunicate:

//on the server socket application
protected function onConnect(event:ServerSocketConnectEvent):void {
incomingSocket = event.socket;
incomingSocket.addEventListener(ProgressEvent.SOCKET_DATA, onData);}

protected function onData(event:ProgressEvent):void {
if (incomingSocket.bytesAvailable > 0){
//here you can pass data to the client using writeBytes, writeUTFBytes and many other methods
/*an example could be:
incomingSocket.writeUTFBytes(String("HELLO!");
incomingSocket.flush();*/
}
}

// on the client socket application you have to create the connection and then manage (send and receive) data from the server
private function createSocketConnection():void{
socket = new Socket()
socket.addEventListener(Event.CONNECT, connectedToServer);
socket.addEventListener(ProgressEvent.SOCKET_DATA, receiveData);
socket.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
socket.addEventListener(Event.CLOSE, closeSocket});
//pass to connect method the server IP and the port to comunicate
socket.connect("127.0.0.1", 7934); 
}
protected function receiveData(event:ProgressEvent):void {
// here you can read all the packets sent from the server
}
protected function ioErrorHandler(event:IOErrorEvent):void {
trace("ioErrorHandler: " + event);
}
private function connectedToServer(e:Event):void{
//yes! you are connected to the socket server
}
private function closeSocket(e:Event):void{
//your socket connection is closed
}

After that you can start to experiments with this new feature as I’ve just done.
Last but not least, as you can see on the release notes, Adobe adds another great feature, that is the capability to stop all movieclips are running on the stage calling a new method “stopAllChildren()” directly from the stage instance.
Simple, easy and useful!

mPresenter 2: become a baker!

Hi All,

Today I’d like to share with you my IndieGoGo campaign to raise $35.000 for mPresenter 2.
mPresenter is a cross-platform software composed by 2 different tools: a mobile manager and a desktop viewer.
It helps you during own presentation to your boss or clients, during a public talk or only when you want to show your holidays photos to your friends.
It’s totally free (7.000 downloads from the stores) and it’s available on Android and iOS marketplace; the desktop app is downloadable directly from the mPresenter website.

With the new release I thought to deliver 2 new main features: mPresenter client to deliver slides trough P2P connection (goal to 15.000 bucks) and the other one is port mPresenter (client and editor) to tablet with a new stunning GUI !

I’d like to take your attention to the $3.000 donation where we customize a special version of mPresenter for your company with a skin dedicated to you, I think a good idea to have a different tool for work force to show products or service, for example, with a cheap investment
if you have any question, suggestion or anything to say me, feel free to contact me directly via email or leaving a comment to this post.

Thank you for your time and thank you in advance if you’ll become my baker!
Thank you also to anyone that decide to spread the word on social networks 😛

Speaking at WHYMCA about Haxe for Flash Platform developers

Hi Guys!
I’ve a good announce to share with my followers, next 24-25 May in Bologna will take place WHYMCA a great mobile conference where I’ll be speaker with Piergiorgio Niero and we’ll talk about Haxe for Flash Platform developers.
We’ll discuss on why we choose Haxe instead JS or other languages, we evaluate differences between Haxe and AS3, we’ll show pros and cons to use Haxe, we’ll show you how create content with Haxe for JS, Flash, Android, iOS and so on.
Finally we give you some tips to getting started with Haxe 😀

So we are waiting for you at WHYMCA! see you there guys!

UPDATE:

This is our session about Haxe during Whymca in Bologna:

Flash Camp Milan review

Yesterday in Milan we had the Flash Camp about Mobile topics and then we had the Flash Camp Party at NH Hotel… really wonderful time.
Like you know, in Italy it’s not so easy to organize those kind of events because usually people don’t move to another city like other foreign countries but Flash Camp had a great success.
This camp was organized in the same place of WhyMCA the mobile revolution, an italian conference focused on mobile topics.
We had 50/60 people per session and I’m glad to say that my session had 80 people so I’m happy about this little success.
All the sessions surfed in deep about CG, design patterns, video optimization for mobile, flex on mobile and so on, so I was really excited to take part in this event.
My session was about Design Pattern for Mobile, I talked about 3 design patterns: Singleton, Observer and Presentation Model.
With a couple of samples (that you can download from this link) and few slides I made an application that run with the same base code on tablet and smartphone; this is an hot topic now on mobile world in particular on Flash Platform side.


In next few weeks I’ll make a post about Presentation Model to share my thoughts about this argument and how to use it in your project , but if you want to start with this topic, take a look at this great post on RIArockstars.

Finally I’d like to thanks the Flash Mind, Adobe Flash Platform User Group Italy, to give me this opportunity, WhyMCA staff for the amazing organization, other speakers of Flash Camp for great time spent together and people that came to talk with us during the Flash Camp and to the beer party too.
I leave also a link to some photos took during Flash Camp in Milan.

Playbook development with Flash Platform

First of all a big THANKS to Mihai Corlan, Adobe Evangelist, that is helping me during this “journey”.
Everything start last year during MAX when I saw for the first time the new BlackBerry tablet: the Playbook 😀
It looked so nice, I thought that it was really amazing.
So after few months I decide to try… and now, I finally can announce that with Mihai we are working on a book on Playbook application development with Flash Platform!

It’ll be an hard job but I want to do it, I hope to receive useful suggestions and questions about this topic and believe me that I’ll be free to talk with you about that.
It will be a book made by developers for developers so I hope that you’ll enjoy it when will be released this september (more or less).
This book will cover following topics:

  • Build, port and optimize apps for the BlackBerry PlayBook tablet device
  • Work with the PlayBook OS APIs, ActionScript, Flex, AIR and other Flash tools/APIs for PlayBook
  • Build a simple app and consuming data
  • Create multimedia and gaming apps for the BlackBerry PlayBook
  • Debug and optimize your PlayBook app

For any news about this book and about Flash Platform development follow this blog and my twitter or facebook account.

Review: HTML5 Mobile Web Development

A couple of weeks ago I became blogger reviewer for O’really, so I take this opportunity to open my mind and learn new stuff about new technologies, programmation languages, etc.

So this is my first review and I start with an HTML5 video course.
Why am I talking about HTML5 in this blog? Because I think it’s important to know and learn if it could be useful in some projects or not.

Starting with this idea I’ve decided to watch this video course about HTML5 on mobile development.
Video courses aren’t my favorite media to learn new stuff because I love to sign my books, add some notes…you know what I mean… but this time I was really impressed about how O’Reilly organized it.
Seems you are in a real classroom with teacher in front of you that show code examples, tips & tricks using HTML5, CSS3 on iPad or iPhone.
Course is focused on mobile development, Jake Carter, the author, shows also Android world, how to configure your computer to work with emulator and simulator for Android, iPhone and so on.

I really love the way that he works in the classroom because first of all he explains the powerful of a particular feature, then show how to implement it and finally a little part of Q&A from internet people (I suppose).
During this video course you can learn useful stuff, take a look at table of contents in O’reilly website.
It was my first time with HTML5 and I think is an interesting technology, in particular, during this course I learn how to work with geolocation,  with JS and Canvas, with audio and video API and again how to save data directly on the device in a database.
I appreciate a lot al meta and css dedicated to iPhone and iPad, very useful.
Finally if you are interesting to learn a new way to develop on mobile, I suggest to take a look at this reference.
It’s useful, easy and I think is a fast method to learn.

Flash Platform on Android

Sorry if I don’t post anything until now but I study a lot during last months and finally I’ve time to write a new post about Flash Platform on Android.

I’m glad to talk about this argument because after Flash Lite experience I was not so excited to work with these technologies on mobile, but finally I can say that we can forget Flash Lite experience in this new way to think mobile.
First of all I’d like to share with you a thought about Adobe mobile direction.
Adobe is releasing 3 cool mobile technologies Flash, Flex and obviously AIR; the most interesting for me is Flex 4.1 (codename HERO) that allow to create contents for RIAs, Dekstop Apps, Mobile RIAs and Mobile Apps.
In fact with HERO, Adobe gives us opportunity to develop better and faster with the same framework! Yes, you read well, 1 framework for everything!
They add some cool components dedicated for mobile development like ActionBar or ViewNavigator. It’s really impressive!
If you have an Android FroYo device, try to download some .apk file made with Flex on Coenraets blog.

I think Adobe is going to the right direction and new technologies that will be released in next months give us a new opportunity to bring our contents and deliver them to mobile! So THANK YOU ADOBE!

After these considerations, I’d like to talk about few experiments that I tried during last weeks.
Flash Platform on Android works very well, cool performance and with a good coding you can create great stuff.
I’m working on a mobile library with some useful components like grid, list, image and so on; I think that work with Flash Platform on mobile is so easy if you have an idea on how to work for mobile.
Obviously, if you are a Flash developer you are not a Flash mobile developer automatically! But you can become a mobile developer in few easy steps:

1. Optimize your code: remember to remove all listeners, put variables to null, using object pooling instead of create and destroy variables, use design patterns and so on.
2. System.gc() finally works! On Flash Player 10.1 if you run this command it works very well and save lots of memory for your porjects!
3. Don’t insert tons of stuff on your screen: when you design UI of your application remember that you have a small screen so remember to work with 14px fonts (minimum size), big hit button area (50px minimum), optimized images, avoid vector strokes.
Remember also to test if an asset is better in pixels instead of vectors or viceversa, because sometimes trying on device is the best way to find an answer!
4. Test on device anytime you add a consistent feature.
Don’t test your application only when you finish it, but test anytime you add a new feature because what you see on your computer could not be the same on your Android device!

Those are only few suggestions to start to work with Flash Platform on Android; on Amazon I saw that many people will release some cool books about Flash Platform development on mobile device so please take a look!

Finally, I give you a couple of videos about a runtime image manipulation on Android with Convolution filter made in less then 50 lines of code and a new component that I develop for our library called Skeleton component that simulate navigation of iPad Wired app but made for Android with Flash Platform.
I’m finishing it but for now I’m glad for final result; it’s totally XML driven and you can add swf, videos or images, send data to swf files and so on.
A cool test that I made is to port it on an AIR app for desktop and without changing a line of code I have the same result!
So if you plan your development well you can have one core and different deploy, thank you again Adobe!
Now I want to try it on an Android tablet and then I’ll post some results about that.
For now I can say that Flash on Android will revolutionize Android mobile development experience and if Adobe goes in this direction I can say that they will revolutionize mobile developer life (not for all, isn’t it Steve?!).