Archive for the 'General' Category

Tue, May 10th, 2011
posted by JC Pontaza 01:05 PM

Reading a book about Javascript performance I found this and I think is very interesting and clear the position of Brendan Eich, the creator of JavaScript and Mozilla’s chief technical officer:

You must be [as tall as an NBA player] to hack on threaded systems, and that means most programmers should run away crying. But they don’t. Instead, as with most other sharp tools, the temptation is to show how big one is by picking up the nearest singlethreaded code and jamming it into a multi-threaded embedding, or tempting racecondition fate otherwise. Occasionally the results are infamous, but too often, with only virtual fingers and limbs lost, no one learns.Threads violate abstractions six ways to Sunday. Mainly by creating race conditions, deadlock hazards, and pessimistic locking overhead. And still they don’t scale up to handle the megacore teraflop future.
So my default answer to questions such as, “When will you add threads to JavaScript?” is: “over your dead body!”

Given Brendan’s influence in the industry and on the future of JavaScript (which is considerable), and the broad degree to which this position is shared, it is safe to say that threads will not be coming to JavaScript anytime soon.

Tue, May 10th, 2011
posted by JC Pontaza 12:05 PM

When we are seeking for creating a responsive, high performance application, specifically on HTML/Javascript, you most of the time ask the developers to write the most efficient code and optimize to make it “as fast as possible”, but how can you know how fast is fast enough? fortunately, this evaluation was already done for us.

Jakob Nielsen is a well-known and well-regarded expert in the field of web usability; the following quote (http://www.useit.com/papers/responsetime.html) addresses the issue of “fast enough”:

The response time guidelines for web-based applications are the same as for all other applications. These guidelines have been the same for 37 years now, so they are also not likely to change with whatever implementation technology comes next.

  • 0.1 second: Limit for users feeling that they are directly manipulating objects in the UI. For example, this is the limit from the time the user selects a column in a table until that column should highlight or otherwise give feedback that it’s selected. Ideally, this wouldalso be the response time for sorting the column—if so, users would feel that they aresorting the table.
  • 1 second: Limit for users feeling that they are freely navigating the command space without having to unduly wait for the computer. A delay of 0.2–1.0 seconds does mean that users notice the delay and thus feel the computer is “working” on the command, as opposed to having the command be a direct effect of the users’ actions. Example: If sorting a table according to the selected column can’t be done in 0.1 seconds, it certainly has to be done in 1 second, or users will feel that the UI is sluggish and will lose the sense of “flow” in performing their task. For delays of more than 1 second, indicate to the user that the computer is working on the problem, for example by changing the shape of the cursor.
  • 10 seconds: Limit for users keeping their attention on the task. Anything slower than 10 seconds needs a percent-done indicator as well as a clearly signposted way for the user to interrupt the operation. Assume that users will need to reorient themselves when they return to the UI after a delay of more than 10 seconds. Delays of longer than 10 seconds are only acceptable during natural breaks in the user’s work, for example when switching tasks.

In other words, if your JavaScript code takes longer than 0.1 seconds to execute, your page won’t have that slick, snappy feel; if it takes longer than 1 second, the application feels sluggish; longer than 10 seconds, and the user will be extremely frustrated. These are the definitive guidelines to use for defining “fast enough.”

Wed, Mar 17th, 2010
posted by JC Pontaza 02:03 PM

After upgrading to the latest version of Firefox today I found that the doubleclick event is not working anymore. I start researching and found that the double click event is not been fired, I don’t know how long this problem will last, but i needed to do something right now, so I place a workaround to mimic the doubleClick event, here is my solution

First add this class to your project:

package com.myapp.utils
{
import flash.events.Event;
import flash.events.MouseEvent;
import flash.utils.Timer;

import mx.core.UIComponent;

/**
* The DVTwoSingleClicksManager allows to two quick single click events on an UIComponent.
*/
public class TwoSingleClicksManager
{

// This is the max delay between successive single clicks to treat them as double click
private const TIME_OUT:int = 1000;

public var active:Boolean=true;
// Component to observe
private var component:UIComponent = null;

public function TwoSingleClicksManager(component:UIComponent)
{
super();
this.component = component;
this.component.addEventListener(MouseEvent.CLICK, singleClick, false, 0, true);
}

// This timer will be used to measure time between click and double click events.
private var timer:Timer = null;
// This var is used to store click event.
private var storedEvent:Event = null;
// This method resets timer and nullify var
private function stopTimer():Event {
var lc_storedEvent:Event = storedEvent;
storedEvent = null;
if (timer != null) {
timer.reset();
timer = null;
}
return lc_storedEvent;
}
// This method stops current timer, creates a new one and starts it.
private function startTimer(event:Event):void {
stopTimer();
storedEvent = event;
timer = new Timer(TIME_OUT, 1);
//timer.addEventListener(TimerEvent.TIMER_COMPLETE, deferredSingleClick);
timer.start();
}

// This method is called when a click event is sent
// One timer is started, event will be forwarded only if timer times out.
private function singleClick(event:MouseEvent):void {
if(active){
if(timer && timer.running) {
var storedEvent:MouseEvent = MouseEvent(stopTimer());
//the new event and old event should have same coordinates, that is clicked on same point
if(storedEvent.stageX  == event.stageX && storedEvent.stageY == event.stageY) {
//Alert.show(“dispatching single event…”);
stopTimer();
dispatchDoubleClick(event);
} else {
startTimer(event);
}
} else {
startTimer(event);
}
}
}


// This method is called when a double click event is sent
// Timer is stopped, so that click event is not sent
private function dispatchDoubleClick(event:MouseEvent):void {
stopTimer();
component.dispatchEvent(new MouseEvent(MouseEvent.DOUBLE_CLICK));
}
}

}

Here is the way to use it:

<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml” layout=”absolute” creationComplete=”setup()”>
<mx:Script>
<![CDATA[
importcom.myapp.utils.TwoSingleClicksManager;
import mx.controls.Alert;

var dcHandler:TwoSingleClicksManager;

private function setup():void{
dcHandler= new TwoSingleClicksManager(labelTxt);
}

private function doubleClickHandler(event:MouseEvent):void{
Alert.show("Double Click on "+event.currentTarget);
}

private function singleClickHandler(event:MouseEvent):void{
Alert.show("Single Click on "+event.currentTarget);
}
]]>
</mx:Script>
<mx:Canvas x=”46″ y=”37″ width=”179″ height=”140″ backgroundColor=”#DB1313″ doubleClick=”doubleClickHandler(event)” >
<mx:Text x=”53″ y=”36″ text=”Not Working” color=”#FBFDFD” fontSize=”12″ doubleClick=”doubleClickHandler(event)”/>
</mx:Canvas>
<mx:Canvas x=”314″ y=”37″ width=”378″ height=”140″ backgroundColor=”#0D0DF1″ doubleClick=”doubleClickHandler(event)”>
<mx:Text id=”labelTxt” x=”10″ y=”10″ text=”Working  &#xd;(only if you click the this label since the TwoSingleClickManager is only attached to the label, but you can attach any object)” color=”#FBFDFD” fontSize=”12″ doubleClick=”doubleClickHandler(event)” height=”114″ width=”333″/>
</mx:Canvas>
</mx:Application>

It was made like this, because I hope this is temporal, otherwise I would have added it to the component and find if we are trying to add a doubleClick event and activate it or something like that so it will work for every component, but for now you have to create a new object of this type for each component where you are expecting a doubleClick Event and deactivated if you don’t want to use it anymore. I think i will keep improving this if is necessary, but I guess a lot of people might be in a rush to fix this and i just wanted to share it.

Tue, Oct 6th, 2009
posted by JC Pontaza 01:10 PM

Flash Professional CS5 will enable you to build applications for iPhone and iPod touch using ActionScript 3. These applications can be delivered to iPhone and iPod touch users through the Apple App Store.

It is going to be possible using Adobe Flash Professional CS5, this is really good news for all the Flash developers and users. Another very important and good news is that while it is possible to create iPhone content using the desktop Flex Framework, they do not recommend it…:-( because the Flex framework is currently optimized for execution in a desktop environment. The performance, UI, and interaction models have not been optimized for mobile devices, but Adobe is working on a mobile Flex Framework, which should be better suited for iPhone development. You can find the latest information on the mobile Flex Framework.

http://www.adobe.com/devnet/logged_in/abansod_iphone.html

http://labs.adobe.com/technologies/flashcs5/

Tue, Oct 6th, 2009
posted by JC Pontaza 01:10 PM

A good friend and colleague sent me this article, and it describes very well the difficulties that a UI guy has to live with. I do agree with most of it, but also i have to add that not all the front-end developers have the skills to fulfill the position. Sometimes a developer become a front-end developer because that’s where the wave took him, bot because you like been a UI guy (developer, architect, engineer or designer). To be a good UI guy, you have to love it, its not just about the coding skills, but you have to have many other “talents”, the more he has the better. I see it like, you might be able to learn how to sing, but a singer was born with that talent, he love it and it comes natural he can definitely improve, but he has it,  as well as a good web designer was born with that good taste, common sense, good visual prospective that let him make everything look good for most of the people, or the same as a good developer was born with the ability to see functions, methods and classes as objects flying and connecting to each other on his mind. Now on this article Paul Carvill is talking about the hard to find developer that can do all that alone, there are really good ones out there, but they definitely not easy find. So i thing is very important what he say at the end:

Know your value
What does this mean if you’re a front-end or client-side web developer? Know your value. What are your skills? Are you a developer, an engineer, a User Experience architect or an Interaction Designer? Advertise your value. Shout about it. Don’t be knowingly undermined or ignored. Create a User Experience team within your business. If they’ve already got one, join it! Your job is incredibly important, and your present employer needs to realize that, as they stand to benefit.”

Fri, Sep 11th, 2009
posted by JC Pontaza 06:09 PM

Today started playing with Flash Catalyst and even though i do like the concept of using designer tools to build better looking apps and generate Flex code, i am afraid that the interaction between (Photoshop-Illustrator)/FC/FB is forcing us to have dev-SIGNERS to use (Photoshop/Illustrator)/FC and then hand it over to a DEV-signer that can actually write the Flex code, or hire a developer with really good designer skills that can play with all the tools at the same time, but that’s definitely is not an easy task. If you want to use it soon, i guess the best option is force real designers to learn a little programming to take it to a point where a good developer can write the rest, but I am afraid is like asking a Mac guy to use a PC or a Java guy to do some .Net, they will do it only if is absolutely necessary but with a very ugly face.

I do believe is a nice prototyping tool, but since FC is still in pampers, I really hope that FC will improve to a point that the generation can be both ways to allow a designer and a developer to interact easily instead for cloning the very few good Flex developers with designer skills.

Mon, Sep 7th, 2009
posted by JC Pontaza 07:09 PM

There are many things you have to consider when you are trying to reduce the sfw file size. There are many obvious solutions like modularizing your application so your main application will load only the common code for an standard user and separating the rest in logical pieces, but you have to understand a little bit of how the compiler works, but basically understand that the compiler will pick and package only the necessary classes for that specific module or application, so is not just separate and compile,  you have to design how are you going to compile and ship your application.

But this time I want to talk about embedding images, recently on a project I am working on I stared trying to reduce the application size. I found many reasons why the application was needing this, but embeddings is the easier to find.

We know embedding images increase the size of the file, but thats not it, make sure the image is not embedded more than once. This application was using the same images across the app like am other, but the problem was that every time they wanted to show it, they were embedding it again and again. That’s a very common mistake, since many developers might thing that by having the image on the source, will add only once, but if you check the generated code you will see that the image is been serialized every time you embed it. To solve this problem there are many other solutions, but the easier one at this point of the project, the easier was to create a singleton class called, IconGetter that embed the application images once, for example:

private static var instance:IconGetter = new IconGetter();

[Embed(source="logo.gif")]
[Bindable]
public var logo:Class;

[Embed(source="broken.gif")]
[Bindable]
private var broken:Class;

public static function get instance():Singleton
{
return instance;
}

public static function getIcon(name:String):Class{

 var icon:Class;

try{
icon=instance[name]
}catch(e:Error){
icon=instance["broken"]
}
return icon;

}

I forced the variables be name with the same image name to return the right image based on the name rather than writing a “case” sentence to find it, the developer just need to know the image name. Another advantage was that this class could be generated with a java class looping through the images..;-)… plus it was going to be easier to “find and replace all” the current embeddings for the new static function call. But if you think about how much you can reduce the size of your application, is worth the effort, plus now you can move this class to a separate library and make it a RSL library to load it only once.

The RSL library depends on the application and needs to be evaluated if is beneficial for that specific case, RSL’s are not always better in some cases. We will write something about it later.

Thu, Mar 5th, 2009
posted by JC Pontaza 03:03 PM

Last week attended to a training called “Flex for Enterprise Architects ” with FarataSystems and i seriously recommend it to other Architects to see all the tricks they have learned and use the ones that apply to your project. They have a lot of experience on trying to deliver “real time” data because of the type of clients they have had. Also they shared a good chunk of tips about modules and application size optimization.

One of the best parts of the training al least for me was the Flex patterns, they talked about some of the patterns that they have found in their experience, i guess there are more around, but from my point of view this is what is lacking on Flex. Thre are no patterns or guidelines, you can do the same thing in 100 different ways, but nobody is saying what is the best or the correct one.

Another thing that “again” was very obvious was the lack of a good Flex framework. Everybody or almost everybody was complaining  Cairngorm and others were looking for a good framework to use, but not even them are willing to take the risk or recommend it, actually they remove or try to remove it from their customer applications. Is understandable, you don’t have to be a rocket scientist to find they issues you will have in long term with it. They have a very good comparison of Flex frameworks, that’s the only place i got a little confused, they imply that you don’t need a framework to build an application, and i agree if you are building a very small application, but if you have a development group of 5 or more and a big application you really need something. I have been working and building frameworks for several years already, and i designed and build a Flex framework for the same reason (there isn’t a good one out there) and i have seen the difference that a good framework can do. Imaging all those applications build on struts been build without it…Actually they are building a good set of utilities to facilitate development and i think they would be very capable team of people that can finally build the most wanted Flex framework. I wish i can share my work with the framework but you know how this works, is the company code and i cant just open it to the public, but i hope i can eventually do somethingon my time and give something to the flex comunity.

But if you ever get the opportunity to go to a training, you are a strong Flex developer AND you have the option to propose or make decisions about your project, its definitely worth it.

Thu, Mar 5th, 2009
posted by JC Pontaza 11:03 AM

After an introduction to channels with FarataSystems guys and their explanation about the difference between them, i came back wondering what would be the best channel communication option for my current project and i found a very good blog post that outline every channel configuration you have available on BlazeDs and LCDS. If you are working with any of these , you will really appreciate the work that Damon Cooper put on it.

You might need some additional knowledge about protocols and connections, but if you don’t know about it, then it will be even better so this blog will lead you to learn some more stuff.

Wed, May 28th, 2008
posted by JC Pontaza 05:05 PM

I have been looking for something like this for long time and i think i wasted a lot more time looking for this, than the time to took me to build it, its actually a very simple way of laying our the components, but very powerful when you are writing corporate or form based applications. The question is simple, how can we have a multi colum form component, i am wrting a Form component that will have a more powerfull layout, holds data, reset and validate the content, but this time i just wanted to share this way to layout a multi column form, i will share the full component once is done, otherways the post will get too long. So this basic layout has to modes, one is Column mode and the other one is Direction mode ( dont orget to right click to see the source code).

Its basically reusing the form component and aligning them using boxes, i don’t know how useful is this for you, but if you are interested on the full component, let me know.

 

You are currently browsing the archives for the General category.

Twitter

Categories

My Photography

  • portia de rossi picture civilization
  • mel smith head suicide 1919
  • buy luc robitaille jersey tanker
  • joaquin phoenix interviews coax
  • lydia cornell married hanes
  • leon taylor writer mariposa
  • mia tyler profile nexus
  • brian newman tx pilot meteor
  • lindsay crouse nude albums
  • erykah badu chords qualifying
  • dick butkus fedex commercial maths
  • jack nicklaus history oils
  • james arness website welcome
  • barbara rush hope mills nc cosco
  • gordon ramsay restaurant in ny coleman
  • carly simon you belong to me amplifiers
  • steve guttenberg hairy chest pictures pitbull
  • thora birch scene wrote
  • kellan lutz pictures creater
  • christopher guest sexy preamp
  • marina sirtis feet toes addiction
  • scott michael foster photos beth
  • tankless creedence
  • youtube john cena v jbl starts
  • hyapatia lee photos carrier
  • kyle maclachlan naked spirit
  • returned admission
  • davy jones in a bucket calculus
  • fred hammond lyrics bread of life boca
  • peco inexpensive
  • amanda detmer pink bra pic dice
  • foxy brown gotta home vegetable
  • corinne bailey rae bio okidata
  • joan osborne guitar chords tabs canary
  • teeth prizes
  • tasha tilberg img sauer
  • leif garrett 1970 s pixels
  • laura benson phyllis benson views
  • alicia keys gangsta lovin suppressor
  • morgan brittany nude bearings
  • russell crowe home desk
  • scarlett johansson with nothing on derivatives
  • wally amos watermelon hats windmill
  • amy anderson escort rechargeable
  • dominic chianese o sole mio ballet
  • glenda jackson pictures video quark
  • standards marks
  • maya rudolph saturday night live period
  • emilio estevez film administration
  • who will floyd mayweather fight next scrapbook
  • nona gaye tattoos armor
  • you lost woody austin admit it failed
  • doc brown nothing to lose decor
  • maria bartiromo predictions mechanism
  • is richard beymer gay hilo
  • esti ginzburg gallery pasadena
  • patrick macnee birthplace orchids
  • cheyenne jackson bio interiors
  • erik anderson seattle wa creatinine
  • download loose ends free gallon
  • kimberly stewart pharmaceutical rep vendors
  • mary alice nelson archambaud crock
  • randy bennett saint mary's quotes brainerd
  • marlee matlin frontal nude setting
  • is ethan embry gay classification
  • john boehner healthcare longevity
  • derrick brown cypress tx networking rowland
  • and david caruso 11 05 2007 waynesville
  • sam waterston in blue jeans lipitor
  • keith richards house madame
  • kelly adams actress eaton
  • joanna kerns nude bathtubs
  • cheaper panini
  • colin powell in dallas airgun
  • monica arnold myspace layouts actuators
  • linda day florida realtor sphere
  • callum blue shirtless codex
  • new soul yael naim song lyrics arrowhead
  • mrs mary walsh queensland click
  • eliza dushku sex sxene january
  • bixby psychics
  • melissa sue anderson skatetown ativan
  • sheryl lee ralphs wedding francis
  • todd peterson minneapolis lani
  • gay jim parsons nude kenedy
  • jolene blalock playboy pics micheals
  • bob dylan and guitar tabs dominica
  • jillian barberie sex tape xanga
  • kelly willis cds billboard
  • kristine w breathe mp3 barrington
  • sean penn movie credits brokers
  • sean lennon lyrics friendly fire footer
  • wesley manufactured
  • maxima solidworks
  • frank skinner tree lions 98 nightclub
  • honesty coaching
  • who is mickey gilley marriet to beetle
  • offical michael biehn fan club aero
  • cameron mathison gay cove
  • joanna cassidy children trusts
  • dj sasha on tour customs
  • sandblasting neve
  • hundred scams
  • samkon gado packer jersey cedric
  • snyder pills
  • liam neeson taken trailer hillary
  • eric reid lsu boring
  • chris pine scar eyebrow rectangular
  • the flamingos i only have eyes scored
  • doris day teachers pet guitar tabs capri
  • lara fabian immortelle lyrics in english gasoline
  • kristina fey cars trip lightbulb
  • priscilla barnes devil rejects pitchers
  • pic of angie dickinson daughter woofer
  • david faustino penis large owasso
  • samantha fox at freeones lionel
  • nathalie kelley smoking cigarettes checking
  • mavis italiano
  • stargate richard dean anderson deco
  • mandy patinkin showcase camcorder
  • lleyton hewitt naked guardians
  • thanksgiving optimum
  • julie walters bill nighy costars gels
  • frank miller flash reed
  • dylan moran drawings clawfoot
  • ruth buzzi jim neighbors wigs
  • david henrie shirtless 2010 fibre
  • glenda jackson prophetess concepts
  • doug reid tiverton sundance
  • dracula dani
  • doug bradley indianapolis dogfood
  • optimistic sounds of blackness lacquer
  • kim cattrall sexual intelligence shape
  • chuck berry golden decade album senate
  • rebecca robinson prize speaking content
  • melissa auf der maur lyrics lockout
  • spencer tunick photos 2002 conventional
  • james blake interracial marriage operator
  • clifton davis philadelphia kaiser
  • kelly hu stood barefoot replacing
  • chuck mangione free sheet music paraguay
  • combat mortal
  • nicholas brendon nude furious
  • catastrophic midis
  • forrest gump pictures haley joel osment accessory
  • claire forlani in pantyhose augustine
  • crissy fabulous
  • cinemark valley view cleveland guages
  • novotel threaded
  • carmine giovinazzo naked reciprocating
  • spree starts
  • michelle rodriguez college stimulate
  • jeff green martinsburg west virginia pointer
  • filmography john phillip law judy
  • nicole scherzinger cd release taupe
  • martin kemp serious and organised giclee
  • cassidy rae mature volcano
  • poppy montgomery actress molds
  • cubic fueling
  • maine meg mego megan kelly mcbrady archery
  • fat joe get it popin ginger
  • omen brownies
  • cory booker inauguration vault
  • wwe mickie james pussy documentation
  • mary mcdonnell biography butterfly
  • avram grant chelsea sweaters
  • illustration exclusion
  • kirstie alley movies she's been in dateline
  • waterbury telnet
  • serena ryder concert horsepower
  • rona barrett photo receiver
  • richard berry louie louie free download false
  • claudia black michael shanks cessna
  • holly madison show in las vegas beryllium
  • dave ball heating air choose
  • colt brennan and redskins preseason cheyenne
  • halle berry and monster's ball heaviest
  • greta scacchi nude gorilla
  • google google