Creative communities platform

Communities platform powered by Silex Labs, dedicated to the creation, support and communication of open source projects

Blog amfPHP

by ariels

Sencha Touch 2 and amfPHP2

April 25, 2012 9:58 am in Blog amfPHP, The Blog

Mathieu Decoene  @Coenego here shares some insights on using Sencha Touch 2 with amfPHP 2

For those who don’t know Sencha Touch: it’s a javascript framework for mobile (based on Sencha
Ext).

It’s always a bit trial and error when new updates are released; new methods, deprecated stuff… I’m
talking about Sencha Touch 2 and amfPHP 2 in this case.

Since we’re talking about mobile apps, Ajax-requests are basically used to receive or send our
data (because we want it to run behind the screens). So, amfPHP is a perfect partner for
communication between Sencha Touch (or any other client framework) and the services.
But some things have changed since boths v1’s… For example: You don’t have to specify your service and
method name any longer in the url-property (to which the request is sent) of the Ajax-request. Now
you have to add both names as a property value together with the other parameters.
Examples of usage:

consider this amfPHP service:

<!--?php class MyService{ function myMethod($data){ // do something with property1 } } ?-->

To call it from Sencha Touch when running it in amfPHP v1, do the following:

var myParams = {
property1: ‘value1’,
property2: ‘value2’
};
Ext.Ajax.request({
method: 'POST',
url: ‘http://www.yoururl.com/amfphp/json.php/MyService.myMethod’,
params: myParams
});

?>

To call it from Sencha Touch when running it in amfPHP v2, do the following:


var myParams = {
serviceName: 'MyService',
methodName: 'myMethod',
parameters: [
{'dataroot': [‘value1’,’value2’]}
]
};

Ext.Ajax.request({
method: 'POST',
url: ‘http://www.yoururl.com/amfphp/?contentType=application/json’,
params: JSON.stringify(myParams);
});

by ariels

Sommeria Search Plugin

April 12, 2012 6:45 pm in Blog amfPHP, Exchange amfPHP, The Blog

This plugin adds a service called SommeriaSearchService to amfPHP. The idea is to be able to access the API of various search engines through this plugin.

Currently there is only one search engine supported, Twitter. Call the ‘searchTwitter’ method on the ‘SommeriaSearchService’ service, and pass a query, for example ‘amfphp’.

To install, simply download the zip from here, unzip and drop the SommeriaSearch folder in amfPHP’s plugins folder.

The Twitter API is documented here.

More info here:

http://arielsommeria.com/blog/2012/04/12/sommeria-search-plugin-for-amfphp-allows-to-search-twitter/

by ariels

Generating Client Projects in amfPHP

March 21, 2012 11:32 pm in Blog amfPHP, Blog Silex Labs, The Blog

I know this has a few people excited, but this is just a proposal. Before any development gets done, we’d like to get the functionalities right. The idea here is to be able to generate client code from the services. This starts with generating a class for each service that allows you to communicate with said service, minimizing the boilerplate code that you have to write. But it can go one step further: generating a full client project that allows you to consume and test the services.

Beyond simply saving time, this could be used in the following scenarios:
- trying out a new runtime or protocol. For example amfPHP is historically associated with Flash, but it would be totally possible to write an Android client template that would allow you to generate an Android client without any Android programming skills.
- Creating a backoffice for customers. Suppose you did this nice project with a CMS and your customer doesn’t like the backoffice because it is too generic. You can use amfPHP to expose the methods that the customer is interested in, generate a client, maybe skin it a bit and you’re done: a custom backoffice.

The service browser is already a starting point: it analyses available services, and allows you to consume them. It is however only fit for use by the developer, for two reasons:
- it is generated at each view, and therefore isn’t suited for production use.
- it can’t easily be customized.

So this is a proposal to refactor and expand the service browser. Please comment!

Read the rest of this entry →

by ariels

AmfPHP forums now hosted on Silex Labs

February 17, 2012 8:51 pm in Blog amfPHP, Blog Silex Labs, The Blog

From now on the best way to get support with amfPHP is right here:

http://www.silexlabs.org/groups/amfphp/amfphp-users/forum/

The reason for the switch is that the Silex Labs platform that powers the website is now stable and powerful enough to handle this and provide a better experience for our users.

As team lead for amfPHP I’d like to take this opportunity to give thanks to @camille, @pol and @lexa for their hard work in putting together the Silex Labs website platform. I’d also like to thank everyone who ever answered a bewildered user’s plea for help on the Sourceforge forums!

The forums on Sourceforge are still open, simply because there doesn’t seem to be a way to disable them without making them disappear. This would be a pity as there is a lot of knowledge there for those who care to look. But but but, please post here from now on!

by ariels

amfPHP version 2.0.1 reloaded is out!

January 23, 2012 10:21 pm in Blog amfPHP, Blog Silex Labs, The Blog

Silex Labs is proud to release the latest and greatest version of amfPHP.  A few months after the much awaited 2.0, we’ve worked hard to make the experience of our users even better.

A lot of work has been put into reworking and completing the documentation. We’ve particularly worked on documenting the plugins distributed with amfPHP. We’ve also reviewed our troubleshooting tips, and added more info about optimizing amfPHP. Those are just the highlights, so please take another look around, and of course if you still feel that something is missing, please let us know!

We’ve also worked on making amfPHP more flexible and extensible. Some people have started working on third party plugins, and we want more, so this should make your life easier. We’ve made many changes under the hood to make things faster, more stable, and more secure.

We’d like to give a big thank you to the community for their support, feedback and ideas. Even those who were rude!

The download page is here: http://www.silexlabs.org/amfphp/downloads/

You can read the details in the changelog, of which there is an excerpt below.

Read the rest of this entry →

by ariels

The First Third Party amfPHP Plugin

October 6, 2011 1:22 pm in Blog amfPHP, The Blog

We’re very pleased to announce that amfPHP has it’s first third party plugin, just weeks after releasing v2.0. It’s called ServiceAccess, and it’s by Bastien Aracil, at http://femtoparsec.net/ . You can find the plugin page here on the exchange platform. http://www.silexlabs.org/exchange/exchange-amfphp/serviceaccess-plugin/ If you too would like to share an amfPHP plugin with the community, you can also create a page here, so let us know!

From the post: ServiceAccess is a AMFPHP plugin to secured access to PHP services easily.

 

by ariels

amfPHP v2 Reloaded is out

September 26, 2011 7:46 pm in Blog amfPHP, The Blog

It’s been a long time coming, but it’s here.

The first release candidate came out in June. Since then there have been quite a few bugfixes and enhancements. A lot of this was in reaction to the feedback from the community, so a big shout goes out to everyone who took the time to help us make this the best release of amfPHP yet.

Get it here:

http://sourceforge.net/projects/amfphp/files/amfphp/amfphp-2.0.zip/download

From the changelog:

AmfPhpGet plugin, for requests just using GET, and cross domain AJAX calls
config shared between plugins support added
switch to return or not error details, and support for custom error messages
service browser design
support for multiple plugin folders
plugins can now add services

by ariels

amfPHP v2 Reloaded Release Candidate 1 is out

June 24, 2011 5:52 pm in Blog amfPHP, The Blog

Silex Labs is pleased to announce the release of the latest version of amfPHP v2.0 “reloaded”, the first release candidate. Hence the beautiful name, v2.0RC1. The final release for v2.0 is planned for September, but in the meantime this release should already be used for new projects. For maintaining old projects, unless you are having issues with 1.9 you can safely wait for September.

From the changelog:

  • better serialization of typed objects.
  • enhanced service browser plugin
  • IExternalizable support
  • fix xml, xmldoc, date types
  • examples
  • refactor for phpdoc compatibility
  • change from gateway.php to index.php
  • miscellaneous bug fixes

Get it here:

http://sourceforge.net/projects/amfphp/files/amfphp/amfphp-2.0RC1.zip/download

by ariels

amfPHP reloaded @ la Cantine le 18 Mai 2011

May 5, 2011 7:05 pm in Blog amfPHP, The Blog

L’équipe Silex Labs est fière de présenter amfPHP à la Cantine, haut lieu parisien du numérique.

Programme de la matinée

mercredi 18 mai 2011 de 9h00 à 13h00

Présentation générale

  • * contexte : reprise du projet / nouvelle version
    * intérêts de l’usage d’AMF
    * démo
  • Questions – réponses
  • Atelier pour les pros, amenez vos ordinateurs !


by ariels

State of amfPHP

April 25, 2011 11:50 am in Blog amfPHP, The Blog

A lot has been done since the beginning of the year. Many thanks and hats off to those who have helped out!

- The beta of V2 reloaded is nearly ready.
- We have a simple website up http://projects.silexlabs.org/?/amfphp
- the old website has been mirrored, for nostalgia about pizzas and for reference http://amfphp-v1.silexlabs.org/
- the documentation is clearly not finished, but it’s started http://community.silexlabs.org/amfphp/documentation/

What’s still to do to get to v2.
- finish the documentation
- start work on a more complete website. We have some ideas here, but it’s at a standstill
- reintegrate the service browser
- write more tests
- fix a few outstanding bugs, mostly in serialization/deserialization, as everything around it seems to be working smoothly

On the side, here are some projects that could be of interest
- the native PHP extension
- Eclipse/Flash Builder integration
- integration with your favourite PHP framework
- more plugins, especially third party
- writing a wikipedia page, an osflash page, etc.

If you feel like you could help, or a comment, or idea, please give us a shout!