Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Show Posts

* | |

  Show Posts
Pages: 1 [2] 3
16  Announcements and General Discussion / Getting Started / Re: Weborb Login Sample using AMFPHP instead on: September 10, 2008, 08:14:49
Really appreciate the help Daniel.

so that i dont have code all over the page, i am attaching a link so you can see all the php files. its a simple structure. one service and one value object php file

http://www.scripton.net/flash/_projects/kofiamfphp.zip

17  Announcements and General Discussion / Getting Started / Re: Weborb Login Sample using AMFPHP instead on: September 10, 2008, 11:48:03
so, i make a call to the service using this json string

"[{username: 'kofi', password: 'kofi', loginDate:'test'}]"

and i get this

(Object)#0
  message = "faultCode:AMFPHP_RUNTIME_ERROR faultString:'Argument 1 passed to LoginServiceFacade::getUser() must be an instance of LoginVO, string given' faultDetail:'/Users/kofiaddaquay/Sites/amfphp2/services/LoginServiceFacade.php on line 26'"
  name = "Error"
  rootCause = (null)

one thing is for sure. the LoginVO class cannot be seen. why? i dont know
18  Announcements and General Discussion / Getting Started / Re: Weborb Login Sample using AMFPHP instead on: September 10, 2008, 11:20:11
Hi :)

thats another problem i am having. in the service browser you are asked for loginVO...what parameter do i put in? username and password are 2 params and not one. is there a way to format username and password into one string to test the service? like some kind of object..get what i mean?
19  Announcements and General Discussion / Getting Started / Re: Weborb Login Sample using AMFPHP instead on: September 09, 2008, 09:44:23
well..every since you said you keep your services in the root of the services folder...i have now put the loginservice.php in that directory. the reverse domain syntax was also too long i cut it down. so the function looks like

function getUser(LoginVO $loginVO)
   {
      include_once("vo/net/scriptoninteractive/buipower/model/vo/LoginVO.php");

    ....(more code to authenticate credentials)
    }

but why ../../../../../../vo/net/scriptoninteractive/flex/weborb/buipower/model/vo/LoginVO.php? isnt that going too far back in the folder directory? i will try it anyway!
20  Announcements and General Discussion / Getting Started / Re: Weborb Login Sample using AMFPHP instead on: September 09, 2008, 12:43:16
weird thing is that when i take the contents of the vo folder located in services and put it in the services root, it takes me back to the error

Argument 1 passed to LoginService::getUser() must be an instance of LoginVO, array given


instead of

vo/net/scriptoninteractive/flex/weborb/buipower/model/vo/LoginVO.php

i have

net/scriptoninteractive/flex/weborb/buipower/model/vo/LoginVO.php

then i get the above error. but amfphp requires you have it in the vo folder :(
21  Announcements and General Discussion / Getting Started / Re: Weborb Login Sample using AMFPHP instead on: September 09, 2008, 12:33:11
Have you ever seen this with servicecapture

correlationId (String):
faultCode (String): AMFPHP_FILE_NOT_FOUND
faultDetail (String): /Users/kofiaddaquay/Sites/amfphp2/core/shared/app/BasicActions.php on line 33
faultString (String): The class {Amf3Broker} could not be found under the class path {/Users/kofiaddaquay/Sites/amfphp2/services/amfphp/Amf3Broker.php}

file not found? i dont understand. everything is in the right position :(
22  Announcements and General Discussion / Getting Started / Re: Weborb Login Sample using AMFPHP instead on: September 09, 2008, 09:40:27
my LoginService.php is located here:

Services -> net -> scriptoninteractive -> flex -> weborb -> buipower -> LoginService.php

thats why i have it like this

_loginService.source = "net.scriptoninteractive.flex.weborb.buipower.LoginService";

so that should work right?

what is service capture?
23  Announcements and General Discussion / Getting Started / Re: Weborb Login Sample using AMFPHP instead on: September 09, 2008, 09:22:40
thats what i thought too...but every time i have my LoginVO like this..

package net.scriptoninteractive.flex.weborb.buipower.model.vo
{
   [RemoteClass(alias="net.scriptoninteractive.flex.weborb.buipower.model.vo.LoginVO")]   
      [Bindable]
   public class LoginVO
   {
      public var username: String;
      public var password: String;
      public var loginDate: Date;
   }   
}

my php loginVO looks like this

<?php
class LoginVO
{
   var $username;
      var $password;
   var $loginDate;
   
   //explicit actionscript package
   var $_explicitType = "net.scriptoninteractive.flex.weborb.buipower.model.vo.LoginVO";   
}
?>



and then i change my remoteobject from

_loginService.source = "BuiPower.LoginService";

to this

_loginService.source = "net.scriptoninteractive.flex.weborb.buipower.LoginService";

I now get this error:

"Channel Disconnected"

and this happened when i noticed that the paths are supposed to be the same. my attempt to do has brought me to this error. do you know what this is Daniel?

Thanks
24  Announcements and General Discussion / Getting Started / Re: Weborb Login Sample using AMFPHP instead on: September 09, 2008, 08:50:10
Thanks for your reply Daniel...

the LoginVO is located in my Services folder under the "vo" folder...like this

Services -> vo -> net -> scriptoninteractive -> flex -> weborb -> buipower -> model -> vo -> LoginVO.php
25  Announcements and General Discussion / Getting Started / Weborb Login Sample using AMFPHP instead on: September 09, 2008, 12:46:03
Hi everyone, i really need some help figuring out why i am getting an error with my app. i am trying to rebuild the Login weborb sample, but this time using AMFPHP. all the logic for the remote object has been set up for working with AMFPHP. But when i try to log in, i get this error

Argument 1 passed to LoginService::getUser() must be an instance of LoginVO, array given

its driving me nuts, because a LoginVO type is what is sent to the _loginService remoteobject when the getUser is called

public function getUser( vo : LoginVO ):void
{
   _loginService.getUser( vo );  <-- HERE   
   CursorManager.setBusyCursor();
}

but i still get the above error ???

i am also suspecting that my php VO and my actionscript VO paths dont match. cant this really be a problem?

my login service has a source of

_loginService.source = "BuiPower.LoginService";

within my Services folder, i have the BuiPower folder then the LoginService.php file. it looks like this (i have removed code so this post isnt too chunky)

<?php

class LoginService
{
   public function __construct()
   {
      //code to connect to db etc
   }
   
   function getUser(LoginVO $loginVO)
   {
      include_once("../vo/net/scriptoninteractive/flex/weborb/buipower/model/vo/LoginVO.php");

    ....(more code to authenticate credentials)
    }
}

?>

finally my actionscript VO and php VO look like this

package net.scriptoninteractive.flex.weborb.buipower.model.vo
{
   [RemoteClass(alias="BuiPower.LoginVO")]   <--notice as VO path isnt same as php
      [Bindable]
   public class LoginVO
   {
      public var username: String;
      public var password: String;
      public var loginDate: Date;
   }   
}
and the php VO which is located in the services folder as
vo/net/scriptoninteractive/flex/weborb/buipower/model/vo/LoginVO.php is

<?php
class LoginVO
{
   var $username;
      var $password;
   var $loginDate;
   
   //explicit actionscript package
   var $_explicitType = "net.scriptoninteractive.flex.weborb.buipower.model.vo.LoginVO";
}
?>

does anyone have any idea...or can share how they have done it with AMFPHP. thanks a bunch!

Sincerely,
Kofi Addaquay
26  Announcements and General Discussion / Getting Started / Re: Best to implement ViewStack or ViewStates or Both on: September 02, 2008, 09:42:44
i think i get what you mean..

is there any sample on this site that uses viewstates instead of view stacks? or do you know any?
27  Announcements and General Discussion / Getting Started / Re: Best to implement ViewStack or ViewStates or Both on: September 02, 2008, 12:14:42
Thanks for your feedback Daniel. Can you explain what you mean by "like a website"? you mean moving from one view to another in the viewstack? You could always control that will transitions cant you?.. to smoothing things out :). ALSO..i didnt understand this statment

"But some modules can have some viewstacks always depends on contents" ? what do you mean

I will take a look at the Slacker Demo, but i still need to know if i can mix the 2.  for example...in my login form(username and password fields), there is an option to register. i was going to create a new state called register so when you clicks on the register link the view state will change to register state. because most of the sample demo on puremvc use viewstack for navigation..i created a new register component / form (with username, password, firstname etc etc field ). i found this to be a bit tedious having to create a register mediator and proxy etc ! instead of having that as part of login mediator etc.(its the same component with dif state) i hope what i am saying is clear :'(

again like i said..if thats the best practice(to create a new component) and not use view states, the i dont care i will do to it. i just need to know what my options are  :-\

Thanks
Kofi
28  Announcements and General Discussion / Getting Started / Best to implement ViewStack or ViewStates or Both on: September 01, 2008, 07:42:49
Hi, i am building my first puremvc project and i have tons of questions  :o ... just so i can keep everything short...my question is this..

in my application so far, the only way i am changing states is with the viewstack...but all of a sudden i am having the urge to have different viewstates within my components and changing the currentState instead of just creating a new component as the new state. creating a new component might be longer...but i really dont care. i just want to make sure i am building it with the right architecture. Can you please comment on which might be best. am i better off  using a viewstack?? rather than mixing viewstacks and viewstates ?
29  Announcements and General Discussion / Getting Started / respository on: March 20, 2008, 09:56:34
hi Cliff, hope all is well :). cant seem to find a link to the repository so i can download the sample applications. i see the browser, but i dont see what urls to put in eclipse to download the file/files. also, is there a new courseware. i cant seem to locate that as well. Thanks for your time.
30  Announcements and General Discussion / Getting Started / Re: Courseware on: February 18, 2008, 10:08:30
Thanks for the quick response. I understand..and shall be patient then and relay any question i have thru the forums. Thanks Cliff

Kofi
Pages: 1 [2] 3