You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Tintin <19...@googlemail.com> on 2014/08/24 18:25:11 UTC

Simple Database Architecture Suggestions Please

Hello

I am at the very beginning of a new project to develop a Flex UI to be
placed within a web page for accessing training content. Think of BBC
iPlayer, Lynda.com, iTunes etc. (but on a very small scale!). The training
content comprises several hundred Lessons. The Lessons are simple static web
pages which are grouped into Topics. Courses are simple collections of
Lessons grouped by their Topics. The new Flex UI simply allows the user to
browse/find content from where they then jump to the corresponding Course or
Lesson.

Users will have several ways of finding training courses or browsing
individual Lessons through an engaging and simple UI.

The first generation, and current, of this was developed in Flash
Professional and the swf file read an XML file which we had to keep updated
as more content was added. It works well and requires nothing of the hosting
environment so portability is simple.

This time I may need a slightly more sophisticated database providing
relationships between data tables and a simple way of providing Search and
filtering capability for the user.

I recognise that I only know what I know and my database experience has been
limited to SQL in a .NET environment so I am looking for your experiences.

So my question is: what would you suggest for a contemporary, simple
database to allow my Apache Flex built swf file to access data resulting in
a dynamic user experience?

Thank you.



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Simple-Database-Architecture-Suggestions-Please-tp7726.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: AW: Simple Database Architecture Suggestions Please

Posted by Javier Guerrero García <ja...@gmail.com>.
Hi Tintin:

Do you need CRUD operations to be commanded from within your flex app, or
just "read-only" data?

If it's the latter, I would recommend you three incredible simple choices:

1. Use MS SQL "FOR XML" statement (6 chars), make an ASP that just executes
the query "FOR XML" (one line), invoque that ASP from your flex app with an
HTTP service with result="e4x" (one line) and just have fun with ecmascript
:)

2. If your data model allows it, use just plain simple CSV/JSON files for
the database, use a fairly simple PHP to grep/filter your results (2 lines,
1 to read the CSV, and 1 to grep it), and use flex builtin JSON.parse /
split("\n",split(",", ... )) (one line) in the result event on your flex
http service (one line) within the app.

3. Keep it in MySQL, use a simple PHP to query the database, return the
result using json_encode/implode("\n",implode(",",$result)), and back to
option 2 :)

I'm not sure if there's a MySQL equivalent for option 1, but if so, you
could also go for it :) If you keep everything one-line simple (without one
dozen frameworks and database abstraction layers inbetween), you will
develop and enhance the app faster and better in the future :)

Just my 2 cents :)


On Tue, Sep 2, 2014 at 6:21 PM, Tintin <19...@googlemail.com>
wrote:

> Thank you Olaf (sorry for the delay in replying) your reply was very
> helpful.
>
> It is looking like PHP and MySQL is the best option for me. I've got to get
> my head around how they talk to each other and allow data to flow from
> MySQL
> to Flex objects. I'm unsure if I need (or should consider) a framework like
> Zend or WebOrb to assist. It may be determined by my client's corporate
> server restrictions.
>
> Out of curiosity, as Flex matures under Apache's watch what is the way
> forward for data-centric web applications? I can see clear trends in the
> Microsoft space such as ASP.NET MVC and Entity Framework, I wondered where
> Flex is heading and who is investing in cooperating with Flex developers to
> provide well integrated data connectivity.
>
> Regards
>
> Chris
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Simple-Database-Architecture-Suggestions-Please-tp7726p7828.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>

Re: AW: AW: Simple Database Architecture Suggestions Please

Posted by Tintin <19...@googlemail.com>.
Hello Olaf

Thank you very much for your comprehensive reply.

I did start using Flash Builder to develop my earlier Flex projects but I
have since switched to IntelliJ (by JetBrains) which I really like. I need
to establish if my client's server has, or could have installed, any Zend
software which may influence my development path.

AMF, from what I have read so far, does seem to provide very efficient
communication between the client and the server. I like your suggestion to
install just the Zend_AMF module, I will look into this more.

I no nothing about Node.js (this project is opening my eyes to all sorts of
technologies which is refreshing). Another subject to research sufficiently
to establish if I should rule it out or not!

I may take you up on the offer to contact you, what method is most
convenient with you?

Regards

Chris



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Simple-Database-Architecture-Suggestions-Please-tp7726p7843.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

AW: AW: Simple Database Architecture Suggestions Please

Posted by Krüger, Olaf <OK...@edscha.com>.
Hi,

> Out of curiosity, as Flex matures under Apache's watch what is the way forward for data-centric web applications?
There was a corporation with Adobe and Zend that created the "Flashbuilder for PHP", an approach to provide additionally IDE functionality including code generation to simplify Flex/PHP development.... but it's discontinued I think.
http://www.adobe.com/devnet/flash-builder/articles/flashbuilder-php-part1.html

Moreover there're some "outdated" open source projects with the goal to speed up the PHP/Flex development process, e.g.:
http://fredericbournival.com/sphex/
(Google with words like "PHP, Flex, ORM, Doctrine" to find other approaches)

>I'm unsure if I need (or should consider) a framework like Zend or WebOrb to assist. It may be determined by my client's corporate server restrictions.
If you'd like to connect your backend via AMF you should I think.
But these libraries are just PHP classes. Using Zend, there's no need to deal with the complete Zend framework, just consider the Zend_AMF module.
If you've questions regarding PHP/MySQL feel free to contact  me.

As an alternative to the venerable PHP/MySQL perhaps you 'd like to take a gander to hip technologies like node.js and noSQL databases (If your data model allows it)  ;-)
http://www.rivellomultimediaconsulting.com/node-js-for-flash-and-flex-introduction/
http://docs.mongodb.org/ecosystem/drivers/node-js/

Connect your AS3 application directly to  MongoDB  (Don't know if this project is still active):
https://code.google.com/p/jmcnet-full-mongo-flex-driver/


Olaf






Meet Edscha at IZB in Wolfsburg,
14.10.-16.10.2014; Hall 7, Stand 7219!
[Meet Edscha at IZB; Hall 7, Stand 7219!]<http://www.izb-online.com/>

________________________________

Edscha Holding GmbH
Sitz der Gesellschaft: Remscheid
Registergericht: Wuppertal, HRB 22889
Geschäftsführung: Francisco J. Riberas Mera, Francisco López Peña, David Vázquez Pascual, Torsten Greiner, Markus Kirchner, Hans-Peter Schulz und Volker Weiss

Vertretungsberechtigt sind nur Geschäftsführer und schriftlich Bevollmächtigte.

Solely Managing Directors or employees with a written proxy have got power of representation.

Der Inhalt dieser E-Mail einschließlich etwaiger beigefügter Dateien ist vertraulich und nur für den Empfänger bestimmt. Sollten Sie nicht der bestimmungsgemäße Empfänger sein, ist Ihnen jegliche Offenlegung, Vervielfältigung, Weitergabe oder Nutzung des Inhalts untersagt. Bitte informieren Sie in diesem Fall unverzüglich den Absender und löschen Sie die E-Mail einschließlich etwaiger beigefügter Dateien von Ihrem System. Vielen Dank.

The contents of this e-mail including any attachments are confidential and may be legally privileged. If you are not the intended recipient, any disclosure, copying, distribution or use of its contents is strictly prohibited, and you should please notify the sender immediately and then delete this e-mail including any attachments from your system. Thank you.

Re: AW: Simple Database Architecture Suggestions Please

Posted by Tintin <19...@googlemail.com>.
Thank you Olaf (sorry for the delay in replying) your reply was very helpful.

It is looking like PHP and MySQL is the best option for me. I've got to get
my head around how they talk to each other and allow data to flow from MySQL
to Flex objects. I'm unsure if I need (or should consider) a framework like
Zend or WebOrb to assist. It may be determined by my client's corporate
server restrictions.

Out of curiosity, as Flex matures under Apache's watch what is the way
forward for data-centric web applications? I can see clear trends in the
Microsoft space such as ASP.NET MVC and Entity Framework, I wondered where
Flex is heading and who is investing in cooperating with Flex developers to
provide well integrated data connectivity.

Regards

Chris



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Simple-Database-Architecture-Suggestions-Please-tp7726p7828.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

AW: Simple Database Architecture Suggestions Please

Posted by Krüger, Olaf <OK...@edscha.com>.
>If anyone can recommend any good reference material/videos for developing a Flex swf integrating PHP/MySQL I would be grateful.
Take a differentiated look at your backend, your Flex app and the way how your Flex app will connect your backend.

Perhaps these steps are helpful implementing an PHP backend:

1)
Install a development environment (Webserver,PHP,DB) on your local machine, e.g.
https://www.apachefriends.org/index.html

2)
Start to build your backend by implementing a simple class that provides simple CRUD operations.
There are tons of PHP/MySQL tutorials out there, I'm sure you'll find great ones, e.g.
http://www.codeofaninja.com/2011/12/php-and-mysql-crud-tutorial.html
http://mrbool.com/how-to-make-database-operations-with-pdo-in-php/27443
http://wiki.hashphp.org/PDO_Tutorial_for_MySQL_Developers

3)
Bring the pieces together and  let your Flex app connect your backend by using HTTP-, WebServices or Remoting(AMF)
This benchmark could be helpful:
http://www.themidnightcoders.com/products/weborb-for-net/developer-den/technical-articles/amf-vs-webservices.html

If you choose AMF, here some PHP libs that fit your needs:
http://framework.zend.com/manual/1.10/en/zend.amf.html
http://www.silexlabs.org/amfphp/
http://www.themidnightcoders.com/products/weborb-for-php/overview.html


Olaf




-----Ursprüngliche Nachricht-----
Von: Tintin [mailto:1955.mille.miglia@googlemail.com]
Gesendet: Mittwoch, 27. August 2014 17:02
An: users@flex.apache.org
Betreff: Re: Simple Database Architecture Suggestions Please

Thanks everyone

My client will be hosting my Flex developed swf within Moodle which I believe uses PHP and MySQL so this appears to be the way forward. I will start looking for a carefully developed example to follow. If anyone can recommend any good reference material/videos for developing a Flex swf integrating PHP/MySQL I would be grateful.


On 27 August 2014 15:34, Kessler CTR Mark J [via Apache Flex Users] <
ml-node+s2333346n7768h19@n4.nabble.com> wrote:

> I agree with using the follow.
>
> MySQL/MariaDB with php serverside
> Or
> MS SQL with ASP.Net serverside.
>
>
>     Concept being running a webserver that has php/asp.net as the
> scripted middle man.  Your application makes a http/https call to the
> web page.  The php/asp.net deals with any user security and then
> retrieves the requested info from the database.  It returns the data
> as part of the server response.
>
>
> There are also other solutions such as running other server side apps
> java/cf/...
>
>
> -Mark
>
>
> -----Original Message-----
> From: Tintin [mailto:[hidden email]
> <http://user/SendEmail.jtp?type=node&node=7768&i=0>]
> Sent: Wednesday, August 27, 2014 2:44 AM
> To: [hidden email] <http://user/SendEmail.jtp?type=node&node=7768&i=1>
> Subject: Re: Simple Database Architecture Suggestions Please
>
> Thanks Scott for your thoughts.
>
> Searching the web I am surprised how little there is on connecting a
> Flex application to a database. I thought it would be a very well trodden path.
> There are plenty of articles from 6 years ago or so but very little
> contemporary support.
>
> One option appears to be to create a relational XML database and keep
> it very simple with no server requirements at all.
>
> PHP and MySQL appears to be an option and possibly MongoDB which you
> suggest.
>
> Can anyone else suggest a really good relational database for
> connecting a Flex application to?
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Simple-Database-Archite
> cture-Suggestions-Please-tp7726p7764.html
>
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the
> discussion
> below:
>
> http://apache-flex-users.2333346.n4.nabble.com/Simple-Database-Archite
> cture-Suggestions-Please-tp7726p7768.html
>  To unsubscribe from Simple Database Architecture Suggestions Please,
> click here
> <http://apache-flex-users.2333346.n4.nabble.com/template/NamlServlet.j
> tp?macro=unsubscribe_by_code&node=7726&code=MTk1NS5taWxsZS5taWdsaWFAZ2
> 9vZ2xlbWFpbC5jb218NzcyNnw3NjA0ODI2NTM=>
> .
> NAML
> <http://apache-flex-users.2333346.n4.nabble.com/template/NamlServlet.j
> tp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabbl
> e.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamesp
> ace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscrib
> ers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_in
> stant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Simple-Database-Architecture-Suggestions-Please-tp7726p7769.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

________________________________

Edscha Holding GmbH
Sitz der Gesellschaft: Remscheid
Registergericht: Wuppertal, HRB 22889
Geschäftsführung: Francisco J. Riberas Mera, Francisco López Peña, David Vázquez Pascual, Torsten Greiner, Markus Kirchner, Hans-Peter Schulz und Volker Weiss

Vertretungsberechtigt sind nur Geschäftsführer und schriftlich Bevollmächtigte.

Solely Managing Directors or employees with a written proxy have got power of representation.

Der Inhalt dieser E-Mail einschließlich etwaiger beigefügter Dateien ist vertraulich und nur für den Empfänger bestimmt. Sollten Sie nicht der bestimmungsgemäße Empfänger sein, ist Ihnen jegliche Offenlegung, Vervielfältigung, Weitergabe oder Nutzung des Inhalts untersagt. Bitte informieren Sie in diesem Fall unverzüglich den Absender und löschen Sie die E-Mail einschließlich etwaiger beigefügter Dateien von Ihrem System. Vielen Dank.

The contents of this e-mail including any attachments are confidential and may be legally privileged. If you are not the intended recipient, any disclosure, copying, distribution or use of its contents is strictly prohibited, and you should please notify the sender immediately and then delete this e-mail including any attachments from your system. Thank you.

Re: Simple Database Architecture Suggestions Please

Posted by Tintin <19...@googlemail.com>.
Thanks everyone

My client will be hosting my Flex developed swf within Moodle which I
believe uses PHP and MySQL so this appears to be the way forward. I will
start looking for a carefully developed example to follow. If anyone can
recommend any good reference material/videos for developing a Flex swf
integrating PHP/MySQL I would be grateful.


On 27 August 2014 15:34, Kessler CTR Mark J [via Apache Flex Users] <
ml-node+s2333346n7768h19@n4.nabble.com> wrote:

> I agree with using the follow.
>
> MySQL/MariaDB with php serverside
> Or
> MS SQL with ASP.Net serverside.
>
>
>     Concept being running a webserver that has php/asp.net as the
> scripted middle man.  Your application makes a http/https call to the web
> page.  The php/asp.net deals with any user security and then retrieves
> the requested info from the database.  It returns the data as part of the
> server response.
>
>
> There are also other solutions such as running other server side apps
> java/cf/...
>
>
> -Mark
>
>
> -----Original Message-----
> From: Tintin [mailto:[hidden email]
> <http://user/SendEmail.jtp?type=node&node=7768&i=0>]
> Sent: Wednesday, August 27, 2014 2:44 AM
> To: [hidden email] <http://user/SendEmail.jtp?type=node&node=7768&i=1>
> Subject: Re: Simple Database Architecture Suggestions Please
>
> Thanks Scott for your thoughts.
>
> Searching the web I am surprised how little there is on connecting a Flex
> application to a database. I thought it would be a very well trodden path.
> There are plenty of articles from 6 years ago or so but very little
> contemporary support.
>
> One option appears to be to create a relational XML database and keep it
> very simple with no server requirements at all.
>
> PHP and MySQL appears to be an option and possibly MongoDB which you
> suggest.
>
> Can anyone else suggest a really good relational database for connecting a
> Flex application to?
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Simple-Database-Architecture-Suggestions-Please-tp7726p7764.html
>
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-flex-users.2333346.n4.nabble.com/Simple-Database-Architecture-Suggestions-Please-tp7726p7768.html
>  To unsubscribe from Simple Database Architecture Suggestions Please, click
> here
> <http://apache-flex-users.2333346.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=7726&code=MTk1NS5taWxsZS5taWdsaWFAZ29vZ2xlbWFpbC5jb218NzcyNnw3NjA0ODI2NTM=>
> .
> NAML
> <http://apache-flex-users.2333346.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Simple-Database-Architecture-Suggestions-Please-tp7726p7769.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

RE: Simple Database Architecture Suggestions Please

Posted by Kessler CTR Mark J <ma...@usmc.mil>.
I agree with using the follow.

MySQL/MariaDB with php serverside
Or
MS SQL with ASP.Net serverside.


    Concept being running a webserver that has php/asp.net as the scripted middle man.  Your application makes a http/https call to the web page.  The php/asp.net deals with any user security and then retrieves the requested info from the database.  It returns the data as part of the server response.


There are also other solutions such as running other server side apps java/cf/...


-Mark


-----Original Message-----
From: Tintin [mailto:1955.mille.miglia@googlemail.com] 
Sent: Wednesday, August 27, 2014 2:44 AM
To: users@flex.apache.org
Subject: Re: Simple Database Architecture Suggestions Please

Thanks Scott for your thoughts.

Searching the web I am surprised how little there is on connecting a Flex
application to a database. I thought it would be a very well trodden path.
There are plenty of articles from 6 years ago or so but very little
contemporary support.

One option appears to be to create a relational XML database and keep it
very simple with no server requirements at all.

PHP and MySQL appears to be an option and possibly MongoDB which you
suggest.

Can anyone else suggest a really good relational database for connecting a
Flex application to?



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Simple-Database-Architecture-Suggestions-Please-tp7726p7764.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

AW: Simple Database Architecture Suggestions Please

Posted by Ulrich Andreas <An...@formware.de>.
I think this is really not a matter of the database - it's much more a matter of the service model (SOAP/REST/Remoting) and the programming environment you are going to implement your backend with.
Choosing a database should be easy because of licensing and pricing terms. Usually you end up with mysql /mariadb, PostgreSQL or Sqlite - if you are looking for a relational Database mongoDB is not an option.

PHP is a common choice - also look at a Ruby/Sinatra combo...



-----Ursprüngliche Nachricht-----
Von: Tintin [mailto:1955.mille.miglia@googlemail.com] 
Gesendet: Mittwoch, 27. August 2014 08:44
An: users@flex.apache.org
Betreff: Re: Simple Database Architecture Suggestions Please

Thanks Scott for your thoughts.

Searching the web I am surprised how little there is on connecting a Flex application to a database. I thought it would be a very well trodden path.
There are plenty of articles from 6 years ago or so but very little contemporary support.

One option appears to be to create a relational XML database and keep it very simple with no server requirements at all.

PHP and MySQL appears to be an option and possibly MongoDB which you suggest.

Can anyone else suggest a really good relational database for connecting a Flex application to?



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Simple-Database-Architecture-Suggestions-Please-tp7726p7764.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Simple Database Architecture Suggestions Please

Posted by Tintin <19...@googlemail.com>.
Thanks Scott for your thoughts.

Searching the web I am surprised how little there is on connecting a Flex
application to a database. I thought it would be a very well trodden path.
There are plenty of articles from 6 years ago or so but very little
contemporary support.

One option appears to be to create a relational XML database and keep it
very simple with no server requirements at all.

PHP and MySQL appears to be an option and possibly MongoDB which you
suggest.

Can anyone else suggest a really good relational database for connecting a
Flex application to?



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Simple-Database-Architecture-Suggestions-Please-tp7726p7764.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Simple Database Architecture Suggestions Please

Posted by Scott Matheson <sm...@intralinks.com>.
Hi
   We are just completing a similarly project XML content flex to build screens, you could keep  the backend simple and using php with a database this will work well, saying that we build a simple nodeJS server and used mongoDB, for the database and it has worked very well, as we make small changes to the database mongoBD accommodates with out any problem

In the end we build a app to allow the teacher to manage the XML, then I created a generator to take teacher created content in to what I needed for XML to drive the app

Happy to share out server code and experance, contact me directly if you want anything

Sent from my iPad

> On 24 Aug 2014, at 17:25, "Tintin" <19...@googlemail.com> wrote:
>
> Hello
>
> I am at the very beginning of a new project to develop a Flex UI to be
> placed within a web page for accessing training content. Think of BBC
> iPlayer, Lynda.com, iTunes etc. (but on a very small scale!). The training
> content comprises several hundred Lessons. The Lessons are simple static web
> pages which are grouped into Topics. Courses are simple collections of
> Lessons grouped by their Topics. The new Flex UI simply allows the user to
> browse/find content from where they then jump to the corresponding Course or
> Lesson.
>
> Users will have several ways of finding training courses or browsing
> individual Lessons through an engaging and simple UI.
>
> The first generation, and current, of this was developed in Flash
> Professional and the swf file read an XML file which we had to keep updated
> as more content was added. It works well and requires nothing of the hosting
> environment so portability is simple.
>
> This time I may need a slightly more sophisticated database providing
> relationships between data tables and a simple way of providing Search and
> filtering capability for the user.
>
> I recognise that I only know what I know and my database experience has been
> limited to SQL in a .NET environment so I am looking for your experiences.
>
> So my question is: what would you suggest for a contemporary, simple
> database to allow my Apache Flex built swf file to access data resulting in
> a dynamic user experience?
>
> Thank you.
>
>
>
> --
> View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Simple-Database-Architecture-Suggestions-Please-tp7726.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.

________________________________

Disclaimer: This electronic mail and any attachments are confidential and may be privileged. If you are not the intended recipient, please notify the sender immediately by replying to this email, and destroy all copies of this email and any attachments. Thank you.