How to work out a small Adobe AIR Application? - php

I would like to know how is it possible, or what knowledge do I need to acquire to create a small Adobe AIR application, probably like a employee directory search that will search and show a list of employee names, from a application based on php/mysql?
Thanks.

First thing you need to do is the communication with php/mysql application based on JSON or XML (whoever suites you). You have to have a page like website.com/employee_list.php which returns you the XML or JSON that you call from ActionScript.
Then you need a fair knowledge of ActionScript (which isn't a very hard language if you programmed before in C or C-based languages), but don't be scared, the help covers it all.
After that you will require an IDE of choice between Flash or Flex (the second is easier to the beginners due to its large object and display library which helps you create rather fast a good looking application.
The search for employees gives you 2 options to realize it:
search made via php/mysql and you
just output the results
search
made via ActionScript searching on
the array of results obtained in 1st
step by requesting to the php/mysql
app the complete list of emplyees
The final step is just to write the code and export the project as an AIR application.
Hope that helps! :)

As an addition to Bogdan's answer, you can also program in Javascript in Adobe Air. Everything (well almost) you can do using the Flex components has a Javascript wrapper, so it is possible to write an Adobe Air app without using any Flex at all, and only using HTML/Javascript.

Related

Like Google Maps - Just local

I was looking to find a solution to our product. We have a geo-location, on a web based dashboard that does not have internet connection.
I was looking for a product that allows you to have local maps and a script, I found OpenLayers which seems cool although weights 22gb.
Do you know if there are other solutions to generate map locally that takes less space?
If I assume correctly, you are basically looking for an alternative to Google Maps, i.e. an alternative mapping service where you can use your own local data, right?
Now, based on your question, its hard to tell whether you
Want to develop something for yourself or buy/adopt an already implemented software
Are looking for the serverside (i.e. tiling/caching engine, geospatial database, etc) or for the clientside or for both
I could give you an example of a possible configuration if you want to develop a clientside application yourself, but that might not be what you are exactly looking for.
For the serverside, you could use MapServer, backed by a PostGIS spatial database (PostGIS is an enhancement of PostgreSQL), and then use a client side Javascript framework BASED on OpenLayers to develop your client application (i.e., the map viewer), such as Fusion, which is also based on the MooTools Javascript Library. You could also natively develop with OpenLayers. There are a lot of possibilities in the Open Source world, it just depends on the skill and time you have.
Also, have a look at OSGEO, in the right sidebar you'll find a lot of projects that are hosted by them. It definetely is your first address for Open Source web mapping solutions.

Can I wrap PHP code from my website in C to build an iOS app?

I have a PHP website that lets users add textual information (notes, posts). I accomplish that by having a database and PHP scripts that insert, delete, edit, and share that info.
Due to the extraordinary success of this product I want to move into the mobile app space. How could I go about wrapping my PHP code in C or Objective-C so that I could re-use this when building an iOS app?
If I can't re-use my PHP code in this manner, how do I go about using C or Objective-C to connect with my database and mimic the functions of the website?
This article shows how to create a login script for an iPhone app using PHP code:
http://kiksy.tumblr.com/post/525713227/iphone-login-app-using-php-mysql-tutorial
Could something similar be done to bring across the rest of my PHP code in an iOS app?
You can not in any kind reuse your PHP code within a native iOS app. Well, at least not the part that renders the UI (HTML, Javascript). You can reuse all of your business logic (adding posts, getting overviews, deleting posts etc). This would be achieved by wrapping your business logic with a JSON or XML based interface towards your iOS app. Your iOS app would then request the data / initiate the transactions using JSON / XML and render it natively on the device. You would need to entirely rebuild your PHP-based UI part and create an Objective C / Objective C++ based version of it. This might be the right solution in case your application needs a fast, responsive and eye-candy-rich UI. Another point for creating a native app would be sales via iTunes.
You may however use a web-based app on the iOS devices by using your PHP code as a whole. For that scenario, all you will have to do is take the smaller screen and limited network bandwidth into account. Without knowing your exact demands, this solution seems to be the most appropriate one. This will allow you to quickly deploy updates and will widen the audience towards other mobile devices.
A third solution would be something that is commonly called a hybrid app. Such hybrid app uses native parts wherever the demands on UI and processing are high and web parts on the rest. Building a hybrid app will also possibly minimize the costs of implementing further versions needed for Android and other platforms, if desired. This would also allow you to sell via iTunes. From my experience however, hybrid apps suck and are tough to develop and debug as you will end up having to communicate between HTML/Javascript and Objective C/Objective C++ (namely the UIWebView). Let me get it straight, this is technically totally possible but again, from my experience the results are not as slick and funky as an entire native app. It has however become a trend to use this approach.
One suggestion would be to use a wrapper library such as this: http://www.swig.org/.
PS: Objective C and C++ can also be used with iPhone development.
You're in a new league. It's not that simple. ground up build is what you need in order to do it correctly
Take a look at http://www.appcelerator.com/ which let's you write your code in Javascript (might be easier for you, coming from web work) and compile it for iPhone and Android.
To get the data from your PHP app you will have to provide some kind of webservice.
Use phoneGap, this way you don't have to create anything from scratch. Use your URL to load into web view phone gap created and you good to go. Link: http://phonegap.com/

Making MySQL databases readable for non-developers

This summer, I will be designing an e-commerce website and have chosen MySQL to organize the incredible amounts of data I will be receiving. The people I am designing for are great at making their products...but have absolutely no development or coding experience.
I have three months to make the site, and I don't begin until June. In the end, they would like an easy, readable, and preferably fasionable way to present this data. They also want to be able to manipulate it (sort by date, item, customer, etc.). They don't care if it's an Excel file, a secure webpage, or anything like that.
I know the basics of MySQL, but I am looking for ways to PRESENT the data in a way that is easy and accessible. I love to teach myself and do my own research, so my question is...what topics of interest in MySQL should I read into to learn how to present this data?
Choose any e-commerce CMS like Magento or oscommerce or opencart. All these e-commerce solutions has many in-built reports that would be needed by the business people..
And there are much more options available than normal reporting and these solutions covers most of the business objectives and business models , so whenever the business evolves it will be easier to update the website with little effort..
For a list of e-commerce solutions and comparisons, visit http://en.wikipedia.org/wiki/Comparison_of_shopping_cart_software
If you have a decent grasp of JavaScript and programming web via PHP or Java I would recommend Dojo DataGrid. It is fairly simple to implement if you use the basic grid and looks and performs great.
Dont use MYSQL - Oracle is going to kill it - it is in their plans - use MariaDB - (drop in replacement for MySQL)
look into using php/mysql together with some fancy jquery stuff like dataTables to present your data. A great article/tutorial on just how to do this can be found here ->
You should get away with knowing the basics of mysql to rig something like that up to work...
If there are a lot of numeric parameters and enum type stuff, try using jquery ui to make it look nice with some sliders and fancy checkboxes etc.
I've got a prototype of something I'm working on (slowly...) that utilizes all of the above if you want to see. here it is! It's for a shopping cart but you get the drift
Good Luck!
Assuming you are building the system yourself (and don't have an off-the-shelf option)...
· If they need lots of flexibility in manipulating the data, I'd run a cron job that exports reports as CSV files for them to open in Excel.
· If there are limited views that they are interested in, I'd run the report as a php script that renders an html table, and make it sortable using a jQuery widget.

web based spreadsheet that can access database

I'm a bit new to web development and wanted some insight on how to approach a project of mine.
We have a large mysql with a fairly large dataset that we want people to be able to play around with. Is there a way to have some sort of web based spreadsheet that, in addition to do normal spreadsheet calculations, query a database and pull down content? We have niche statical information on companies we research, ideally a user would come to the site and be able to access our data while adding their own logic(math operators) to make it more relevant to them.
We don't want to create an api to connect to their desktops(yet) and want to do this entirely over the web.
Any help on the approach or tools you'd use would be greatly appreciated.
Thanks in advance
Edit: I found a good tool for drupal "Sheetnode" which uses phpexcel....I'll study it, I'm not totally sure if it allows mysql queries to be added within cells.
Give YUI datatable a try. The YUI library is one of the best-documented libraries. Yes, you can do queries for every cell in the sheet. You can use one query to populate the whole spreadsheet, and then another query for updating each individual cell. You will be responsible for programming the server-side code in Drupal using your own custom module. The menu_hook in Drupal will allow you to accept RESTful calls from the datatable and JavaScript.
I found phpexcel ( phpexcel.codeplex.com/ ) does what I want and there's a module for drupal for me.
If you're familiar with Java, the most relevant choice would probably be https://vaadin.com/spreadsheet and using the open source framework Vaadin (Disclaimer: I'm working for the company behind the tool).
But anyhow, with this it's as easy as:
Spreadsheet s = new Spreadsheet(
new File("/path/to/some/xls/file/on/server.xlsx"));
layout.addComponent(s);
to add a excel file in your web browser.

How to implement a desktop ticker?

I would like to implement a desktop based ticker. The ticker would display number of users that have signed up for a product on a related PHP website. This data is stored in a MySQL database. The ticker gets updated every time a new user signs up. This would be easy to implement if it was web based, can you suggest me the best way to implement this as a desktop standalone application(Rules out Yahoo widgets and Windows sidebar or Google widgets).
So far I have considered implementing using Adobe air as it brings web skills to desktop application and gives a nice look & feel to the application.
Thanks
Make a widget with JavaScript (jQuery) and let it fetch data every 1 min via AJAX from your PHP (maybe Zend or Yii) application.
If I understand you correctly, you just want a simple desktop application with just one purpose: "Display data that gets regularly updated". For this task you can use almost any language you want - to achieve platform independence, you can use java, .net (with mono) or any scripting language (even php).
There is no language that suits this simple task best, so just pick one you know (or one you want to learn).
I would use Java, but that's maybe because I have no background in creating platform independent C-code.
Maybe you could describe your idea in more detail, that might narrow it down.

Categories