Best practice - transitions without state?
I'm noticing that, sometimes, its easier to just do a
Transition on a component without having the changes in a State.
For example, I can't seem to get a sequence of Resize effects
when the properties are set in State, but I succeed when I empty
out the state. No combination of SetPropertyAction seems to work.
Is this a best practice? Or is it considered sloppy? How do
you decide what to put in a State, and what to put in a
Transition?
I have been coding Flex for a little over 2 years and the
first project used states. We moved away from states because we ran
into a couple bugs (in Flex 2) and it made the code less easy to
read and organize.
Transitions seemed more natural from a coding aspect. So now
most everything is done in transitions and once in a while a custom
component will use states.
Similar Messages
-
Best practice: Using break statement inside for loop
Hi All,
Using break statment inside FOR loop is a best practice or not?
I have given some sample code:
1. With break statement
2. With some boolean variable that decide whether to come out of the loop or not.
for(int i = 0; i < 10; i++){
if(i == 5){
break;
boolean breakForLoop = false;
for(int i = 0; i < 10 && !breakForLoop; i++){
if(i == 5){
breakForLoop = true;
The example may be a stupid one. But i want to know which one is good?
Thanks and Regards,
Ashok kumar B.Actually, it's bad practice to use break anywhere other than in conjunction with a switch statement.Presumably, if you favour:
boolean test = true;
while (test)
test = foo && bar;
if (test)
}overfor (;;)
if (! ( foo && bar) ) break;
}then you also favour
boolean test = foo && bar;
if (test)
}overif (foo && bar)
}Or can you justify your statement with any example which doesn't cause more complexity, more variables in scope, and multiple assignments and tests? -
Flex Best Practices-Transitions
What would be the best way to transition from a small login
screen to a full application once the user has been verified? The
best example that I could find uses flex's base states
http://www.vipercreations.com/media/tutorials/login_system_with_flex_and_php/
(Login with user:test,pass:test)
I don't think thats the wrong way to do it, but I don't know
if its the best.well, i do it this way
public function login(userId:String, password:String):void
var url:String = "
http://"+GeneralSettings.SERVERIP+":8080/login.do";
var request:URLRequest = new URLRequest(url);
var variables:URLVariables = new URLVariables();
variables.userId = userId;
variables.password = password;
request.data = variables;
request.method = URLRequestMethod.POST;
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, requestWsdls);
loader.load(request);
} -
Cairngorm 3 - Best practice for component states
Hi,
I have here small question.
I have some component states (eq: application state, some component states, atp.) in my Application.
I'm not sure if is best practise to save component states in Presentation Models, they hold current state only. So, i create ApplicationState class, which holding all possible application states. And here is my problem, i'm not sure, where should be this "State" class stored. In application directory or create another "states" directory name ?
Well, i'm not sure.
Thx.Hi,
I have here small question.
I have some component states (eq: application state, some component states, atp.) in my Application.
I'm not sure if is best practise to save component states in Presentation Models, they hold current state only. So, i create ApplicationState class, which holding all possible application states. And here is my problem, i'm not sure, where should be this "State" class stored. In application directory or create another "states" directory name ?
Well, i'm not sure.
Thx. -
Best Practice: Combine prepared statements with ;
Hi,
I would like to know what the best prctice is for combining prepared statements to give the query below
INSERT INTO my_table (value) VALUES (?); SELECT LAST_INSERT_ID()The reason for this is that i have written a simple DB wrapper to handle my database connections and queries based on a property file containing sql strings. I would prefer not to change this wrapper code, but be able to specify combined queries in the sql string if possible.
Thanks in advanceHave you thought about using Batch statements ?
-
Best practices for WC State, Code, Attribute
Currently, our process for assigning WC Codes is to assign them at the position level once an ee is joined to the position. The result is a lot of one-off efforts outside of our regular workflow. Is it possible to assign these attributes at the job key level? So that way anytime a position is created, it inherits that information from the job key?
Dear Ryan,
It is not possible in the standard to add tab into PPOME/PPOSE, as per notes below
327614 TA PPOME customer-specific tab pages
483345 Transaction PPOME Tab for standard infotypes is missing
410869 PPOME: Infotypes in the detailed area
385019 PPOME Detail including SAP standard infotypes
I have also pasted in the relevant paragraph from note 385019:
Tab pages for additional SAP standard infotypes are not available in the standard system and CANNOT be generated as described in note 327614 (transaction PPOME customer-specific tab pages).
All the infotypes predefined for PPOME/PPOSE can be found in table T77OCTABUS; it is only necessary to activate or deactivate them.
Best regards
Sarah -
JSR 168 best practice for saving inter-portlet state
The portlet specification doesn't yet cover inter-portlet communication. Until
it does, what is the best practice for saveing state so that multiple portlets
can use the same data?The portlet session is layered on top of the HTTP session except for
attribute scoping. So, all portlets in a webapp share the same
HTTP/portlet session for a given client.
All APPLICATION_SCOPEd portlet session attributes are automatically
available to other portlets. With PORTLET_SCOPEd attributes, portlet
containers namespace attribute names, so it would be hard to get
attributes by name (but still possible).
Subbu
Chris Jennings said the following on 10/14/2003 09:17 AM:
If I set an attribute in a PortletSession, though, it isn't visible form another
PortletSession... right? Please tell me that's wrong ;-) If that's right, how
can I have portlet B get to something set by portlet A?
Subbu Allamaraju <[email protected]> wrote:
Chris,
For sharing transient state, the only possible mechanism in V1.0 is to
use sessions.
Subbu -
Running Best Practice Analyzer on remote 2008 R2 domain controllers
Hello Powershell World,
I'll start out by first mentioning that I am a powershell rookie so I gladly welcome any input to help me improve or work more efficiently. Anyway, I recently used powershell to run the best practice analyzer for DNS on all of our domain controllers.
The way I went about was pretty tedious and inefficient but still got the job done through a series of one-liners and exported the report to a UNC path as follows:
Enable-PSremoting -Force (I logged into all of the domain controllers individually and ran this before running the one-liners below from my workstation)
New-PSSession -Name <Session Name> -ComputerName <Hostname>
Enter-PSSession -Name <Session Name>
Import-Module bestpractices
Invoke-BPAModel Microsoft/Windows/DNSServer
Get-BPAResult Microsoft/Windows/DNSServer | Select ModelId,Severity,Category,Title,Problem,Impact,Resolution,Compliance,Help | Sort Category | Export-CSV \\server\share\BPA_DNS_SERVERNAME.csv
I'm looking to do this again but for the Directory Services best practice analyzer without having to individually enable remoting on the domain controllers and also provide a lsit of servers for the script to run against.
Thanks in advance for all your help!What do you mean by "without having to individually enable remoting "?
You cannot remote without enabling remoting. You only need to enable remoting once. It is a configuraiton change. If you have done it once you do not need to do it again.
Here is how to runfrom a list of DCs.
$sb={
Import-Module bestpractices
Invoke-BPAModel Microsoft/Windows/DNSServer
Get-BPAResult Microsoft/Windows/DNSServer |
Select ModelId,Severity,Category,Title,Problem,Impact,Resolution,Compliance,Help |
Sort Category |
Export-CSV "\\server\share\BPA_DNS_$env:COMPUTERNAME.csv"
Invoke-BPAModel Microsoft/Windows/DirectoryServices
# etc...
ForEach($dc in $listofDCs){
Invoke-Command -ScriptBlock $sb -Computer $dc
¯\_(ツ)_/¯ -
Integrate Best Practice in my application
Hi.
I have developed a fusion application for my organization. It is based on pages and we don't have bounded task flows. I want to create bounded task flows with page fragments as a best practice, but without modifying the home page that has a menu bar which dinamycally loads up all the options from the data base. When I clic on an option from the menu bar I want to call a bounded task flow. For example I have an option security and inside I have sub-options.
The problem is that home page is in unbounded task flow and i can't call a bounded task flow with page fragments.
Thank you.Ok i got it, but I have one problem. I have a commandNavigationItem (global link) and If I clic it then i see the corresponding taskflow, but If i clic on the menu items from the menu bar I go to a page and then clic on the commandNavigationItem i don't see the taskFlow, it stays in the page.
Edited by: Miguel Angel on 06/11/2012 03:57 PM -
What is the best practice for changing view states?
I have a component with two Pie Charts that display
percentages at two specific dates (think start and end values).
But, I have three views: Start Value only, End Value only, or show
Both. I am using a ToggleButtonBar to control the display. What is
the best practice for changing this kind of view state? Right now
(since this code was inherited), the view states are changed in an
ActionScript function which sets the visible and includeInLayout
properties on each Pie Chart based on the selectedIndex of the
ToggleButtonBar, but, this just doesn't seem like the best way to
do this - not very dynamic. I'd like to be able to change the state
based on the name of the selectedItem, in case the order of the
ToggleButtons changes, and since I am storing the name of the
selectedItem for future reference.
Would using States be better? If so, what would be the best
way to implement this?
Thanks.I would stick with non-states, as I have always heard that
states are more for smaller components that need to change under
certain conditions, like a login screen that changes if the user
needs to register.
That said, if the UI of what you are dealing with is not
overly complex, and if it will not become overly complex, maybe
states is the way to go.
Looking at your code, I don't think you'll save much in terms
of lines of code. -
Best practice for upgrading task definition without deleting task instances
best practice for upgrading task definition in production system without deleting or terminating task instances
If I try and update a task definition with task instances running I get the following error:
Task definition 'My Task - Add User' may not be modified while there are active task instances
Is there a best practice to handle this. I tried to force an update through the console but that didn't work. I tried editing the task from the debug page and got the same error.1) Rename the original task definition.
2) Upload the new task definition with the original name.
3) Later, after all the running tasks have timed out, delete the old definition.
E.g., if your task definition is "myWorkflow":
1) Rename "myWorkflow" to "myWorkflow-old-2009-07-28"
2) Upload the new task definition as "myWorkflow".
Existing tasks will stay linked to the original (renamed) workflow definition.
New tasks will use the new definition.
As the previous poster notes, depending on the changes you are making, letting the old task definitions stay active could have bad side-effects and might be better avoided. -
Best Practice with States and lots of code lines
Hi.
This is my first application in flex.
I'm ok with as3.
Now, in as3 we were 'forced' to work mostly with external classes so hardly we have a unique code page with lots of lines.
In flex, using States leads to build codes with lots of line IF we think on states as web site pages.
I'm not sure it I understand it right. You mean: if an user visits a website built with 10 pages, but the users access only 2 pages, all that 8 remaining pages would have to be download to the swf the user loads? (this is, considering the usage os states as pages)
I'm building a system where the user logs to use it.
2 states at now: login page and home page.
I access the db, and get the user and password with this event dispatched from the db.result (this works, however i found it too-old-style looping. Is there a better way, of course, which?)
protected function usersService_resultHandler(event:ResultEvent):void
allUsers = event.result as ArrayCollection;
for (var i:uint;i<allUsers.length;i++){
if(allUsers[i].user == tx_user.text && allUsers[i].password == tx_password.text)
currentState = "home";
else
Alert.show("Fault", "Login");
While I have start to build the "home" page/state, I realized that my code would dramatcally increase. Is it the best practice? Do I have to call another url after login (to open a Session - please, some Session tutorials in flex)? Or I keep doing all in states? I'm afraid my swf would grow bigger.
ThanksOk.
The problem is that I'm not used to PHP, and I have generated the code to deal with the server automatically via Flex.
However I could add a new function, and I could guess how to catch values in the db to compare.
its a frankenstein function, but i'm afraid it also works. By now, there is no way to know whether user mistyped password or username.
public function getUserVerification($user, $pass) {
$stmt = mysqli_prepare($this->connection, "SELECT user, password FROM $this->tablename where user=? AND password=?");
$this->throwExceptionOnError();
mysqli_stmt_bind_param($stmt, 'ss', $user, $pass);
$this->throwExceptionOnError();
mysqli_stmt_execute($stmt);
$this->throwExceptionOnError();
mysqli_stmt_bind_result($stmt, $row->user, $row->password);
if(mysqli_stmt_fetch($stmt)) {
return 1;
} else {
return 0;
Also I had to update the _Super_UsersService.as Class flex had generated before when I first created a php code to deal with db.
Finaly, I had to assign return and input types for the new function I've created.
Amazing... it works.
Now, when pressing the submit button on the login, flex sends user and password so php compare them instead looping it in a Array.
Also, I have made all this code inside a "loginView" component. So my main app is clean again.
I guess I understand the idea of using components and reusing them as many as possible. I just have to get used to how to access a component value from outside and vice-versa.
Now, the creationPolicy is something I would look for. This might be interesting.
Thanks a lot.
Btp~ -
Best Practices for SAP, connections to use without BW
Hello,
Could you help me to solve a problem with Best Practices 4.31?
SAP Integration Kit XI 3.1 SP3 has 4 options :
u2022 SAP Infosets
u2022 SAP BW MDX Query
u2022 SAP BW Query
u2022 Table, cluster ou function
When I install SAP Integration Kit XI 3.1 SP3 for serveur, I have one additional service in my CCM, BW Publisher 12. This service is from SAP BW.
From the article /people/glen.spalding/blog/2010/08/04/the-full-montypart-13bobj-integration-kit-sp3-install-configure and installation guide for IIntegration Kit XI 3.1 SP3 I've learned that I need SAP BW to use Infosets dans Crystal Reports.
Dans notre installation nous avons
u2022 SAP ERP système without BW,
u2022 BOBJ Server Setup,
u2022 BOBJ Edge Integration Kit for SAP XI 3.1 SP3 server
u2022 BOBJ Client Setup,
u2022 BOBJ Edge Integration Kit for SAP XI 3.1 SP3 client
u2022 Crystal Reports 2008
u2022 Xcelsius 2008
I've got Best Practices reports via « Table, cluster ou fonction » connection. There is no problem with this type of connection !
I suppose that « SAP Infosets », « SAP BW MDX Query » et « SAP BW Query » connections should be used with SAP BW.
Could you give me your opinion about this question?
Thanks beforehand,
MalikaHi,
the InfoSets are a connection option for the classic InfoSets in an ERP system. Would suggest you take a look at the user guide for the SAP Integration Kit
ingo -
20 State Limitation... best practice for FC 5.5
After reading past posts, I'm aware of the 20 State limitation within the app. Having said that, is there such a thing as "best practice" to increase the number of States? Using Flash Pro is not an option. Thank you and much appreciated.
You need to look at grouping you design into custom components to get around the 20 state limit, or you might have to introduce real code to the project via Flash Builder.
Chris -
Best
practice to remove content databases from SharePoint 2007 without any Farm
impact <o:p></o:p>Hi ,
For removing a content database from a Web application, you can take steps as below:
1.On the Manage Content Databases page, click the content database that you want to remove.
2.On the Manage Content Database Settings page, in the Remove Content Database section, select the Remove content database check box.
If any sites are currently using this database, a message box appears. Click OK to indicate that you want to proceed with the removal.
3.Click OK.
Reference:
http://technet.microsoft.com/en-us/library/cc262440(v=office.12).aspx
Best Regards,
Eric
Eric Tao
TechNet Community Support
Maybe you are looking for
-
When I search for a document on my mac or want to add an attachment in mail I always used the defaults on the left to narrow down what I was looking at. it had the option for Today, this week, last week and not sure what else. now that I have upgra
-
Program or function module to get active Batch jobs
Hi Experts, I need a program or a FM that would give me the list of active batch jobs and also the time they were running for. Plz help me out
-
Database failed to start up - ORA-03113: end-of-file on communication chann
Hi, We had power failure, and i had to restore the database from offline backup. after restore i tried to start the database and i received following errors. SQL> startup ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance ORA
-
Dear all, I have an issue in report painter. in selection screen i have from period to toperiod and i am giving inputs for both period let say : 1 to 3 (my fiscal year v3) in output list i want to show such first month April and June to do this what
-
How can I find a lost bookmark folder? A folder stuck on my mouse pointer I shook the mouse and it released the folder somewhere in the hundreds of other bookmark folders. I don't want to have to open every folder and search every file to locate it.