Chat application in PHP - php

Which technologies I need to learn for developing Online Chat Room with voice/video support?
Presently I know Core PHP/MySql and DHTML.

If you want to do a chat that would scale, you need to learn how to write an event handled application, there is a lot of framework to build such application, a short list
node.js
python twisted
etc...
This tool would permit you to use the comet style of ajax call.
Sadly, I don't think there is any event driven web server/framework for PHP, so you would probably have to learn other language.

Websockets do suit the job best. That means you ought to study some javascript and a serverside technology of your choice. http://dev.w3.org/html5/websockets/

There is a free API called TokBox that I've used for custom video chat applications in the past:
http://www.tokbox.com/
You'll have to build a back end for storing and passing chat sessions, but it has a very robust javascript library that lets you control the number of participants, the position and size of screens, audio controls, etc etc etc... and it has developer libraries in php and several other languages that help you connect to their servers to back-end controls (including downloading and archiving chats).
It's well documented, and I was able to get a fairly customized system up in about a day.

Related

How to combine Flash ActionScript with PHP?

I am new to using flash and I need to make a web application using CodeIgniter with PHP.
I have some doubts about the MVC pattern applied in codeigniter.
I'll use ActionScript because I see that is most used and less complex. (correct me if I'm wrong)
Are my views (which are in the folder view) would separate my files in Flash?
Any IDE assist me in programming flash with php?
Should I create a separate Flash application from another application to connect php?
Any consideration to be taken into account?
Thanks in advance.
I'm not sure if "combine" is the right word here. If you integrate PHP, ActionScript and CodeIgniter, you'll actually be writing PHP within the CodeIgniter framework and then embedding Flash .swf files into your views.
If you plan on using this combination, what you'll need to do is map out your site and determine which parts are going to be done in PHP and which parts need to be done in Flash (or ActionScript).
My recommendation: Only use Flash where unescapably necessary. That is, use CodeIgniter for your website pages and to integrate with your data sources (via PHP) and create REST endpoints (via CodeIgniter) for data that needs to be accessed via your Flash implementations. Then, create your Flash (or Flex) application that needs to handle the audio recording and embed that into one of your CodeIgniter views.
Re:
I'll use ActionScript because I see that is most used and less complex (than FLEX).
IMO, Flex (and MXML) is essentially just a markup language for ActionScript. It actually gets compiled into ActionScript when you build your .swf file. So, choosing ActionScript vs. Flex is just a personal preference. If you're more familiar with the Flash interface than the Flex Builder interface, then go ahead with ActionScript exclusively. However, for what you say that you want to build (an audio recorder), there are already numerous examples of those available in Flex.
As far as an IDE discussion, for PHP - whatever you're familiar with. If you're looking for a full-featured IDE, I'd recommend something like PHPStorm. You can also get by with any text editor.
For Flex or ActionScript, you'd almost have to go with Flex Builder or Flash.
Try looking at amfphp (http://www.silexlabs.org/amfphp/) if you want to connect flash and PHP.
We used it for the commercial release of flash/flex based games with a PHP/Apache backend.

Turning Web App to Mobile App... PhoneGap?

I want to delve in to mobile applications, specifically Android apps (I am an Android fanboy). My web application is a content based site; built with PHP/MySQL and served with a lot of HTML5, CSS3 and JQuery.
What would be the best starting point and direction to take to begin development of a mobile application? I've seen a couple of videos on PhoneGap and it seems very interesting with its standards-based cross-platform approach. Is that a good way to go?
My basic intend is to have an application that can load content from my site (served to the app probably as JSON or XML) which the application can render in native UI (or make use of local storage etc. that a simple web content frame won't do). I guess it would be a glorified mobile site, but I want it to me slightly more with the ability to save and render content for if internet is not available.
PhoneGap does a nice job of bridging native APIs so they are available to your JavaScript. What you really need to consider though is the look, feel, and performance of the HTML/CSS/JavaScript you run on top of PhoneGap.
I have recently started building an app with JQueryMobile. The look and feel is really nice, and I was able to build something very rapidly. However, page transitions are very blinky/choppy to the point where I don't think its acceptable. This is really a problem with Android's browser performance and not JQuery Moble.
Sencha Touch seems to have animations and transitions that are a bit smoother, but it has a steeper learning curve.
Another option is to create an application which is a hybrid, containing some PhoneGap based Activities and some purely native Activities.
Since you are already familiar with web development, I would suggest doing a quick sprint with PhoneGap and Sencha Touch. If it looks promising, stick with it. If it doesn't, abandon it for a native app.
If you want to use native UI & controls, then Phonegap will not help you. It essentially wraps HTML/CSS/JS in an app & provide JS API's for native device features. It does not help you create native UI & controls.
You can directly code in native Java or use Titanium if you want to code in JS and build portable apps with native UI.
If you are only going to be targeting Android, then I would suggest avaioding PhoneGap or other cross platform SDK's. If you're comfortable with Java or are willing to learn, go with the Android SDK tools and Eclipse.
I have found that working with JSON is extremely simple on Android, and dealing with xml is not that much harder.
If you want to stay away from coding in Java, you could simply use what you have already as an HTML5 app, and create a new mobile CSS to reflow the look and layout of your app. That way, you can still use all the HTML and javascript you are currently using, and get your info from the same server...
In my experience though, Android web app are very slow... unfortunately (and hopefully Chrome will fix this) android browser is very bad with javascript... very slow.

Developing an application server: django vs. zend vs. cakephp vs. codeigniter vs. other

I'm trying to develop an application server that will deliver content to a core group of websites, as well as provide third party services to other websites that also want to use this content. The app server will be hosting web services for these core + 3rd party websites. Authentication and all that comes into play. The data itself will consist of millions of records.
These records will come from a variety of sources: APIs, RSS feeds, REST services, etc. This app server will essentially collect this data on a routine basis, and update the database with this new information. This data will then be shared via some sort of web service (most likely REST) to the core websites and 3rd party websites.
FYI, I'm making a distinction between core sites and 3rd party websites because there will be different access levels, i.e. a core website will have more access than a 3rd party website.
All that said, I'm trying to make the best decision on which framework to use. At the risk of losing all credibility, I currently have a ton of this code written as a wordpress plugin. What started as a one-time site evolved into several sites, and some homebrew hacking to make my outdated infrastructure work across multiple sites.
I'm looking to migrate all of this to a new application server, with a solid framework.
Since everything is written in PHP, obviously I'm tempted to do the migration in PHP. However, I'm considering Python because of its powerful ability to manipulate data. I don't know if it's worth the hassle, though, of rewriting a lot of code in Python.
Could anyone give me some tips on what I should do? I'm really looking to clean up a big mess more than anything, and would like a framework to encourage some solid programming conventions.
All of the frameworks that you mentioned are capable. Pick one in the language that you know the best and use that.
I agree with #gpojd's opinion. All of them that you mentioned are fully capable.
However, it looks like they are too powerful for your job. Because they are all full-stack MVC-like web frameworks shipped with ORM, Template engine, URL redirections and i18n supports.
So, I suggest you to use more lighter/thinner frameworks. and if you don't mind choosing any programming languages, please check out the below frameworks.
Python
Werkzeug : http://werkzeug.pocoo.org/
Javascript
node.js : http://nodejs.org/
with Stylus framework : http://expressjs.com/

How to design a mobile-based application for examination assessment

I want to design a mobile-based application that enable lectures set question through iphone.
I have had an website designed by PHP that lecture can set question through internet.
How to change and start?
Please tell me the detailed process.
Thank you very much.
If you are trying to design a mobile WEB application PHP should not be your first concern.
You will first need to understand the differences of styling web apps using CSS for mobile phones. There are some frameworks out there that can help you with this - I have never used one myself but a quick Google found http://www.phonegap.com/.
If you want to build actual native apps you will need to build them in that phones native language - iPhone is Objective-C, Android is a version of Java and so on.
Start by reading this:
http://webdesign.about.com/od/mobile/a/write-web-pages-for-the-iphone.htm
and then go directly to specifications.
Sencha Touch is also one of the more popular frameworks to build mobile apps with HTML5/Javascript. Of course you can use any server side scripting language like PHP with it.
Building native apps for mobile devices is much different than building a web-based application for use by a larger (compatible) audience. If you desire the look and feel of a native app for your project, then you might think about building and app for the most popular of mobile device operating systems, such as for the iPhone, Blackberry, Android and any other mobile devices you want to include. Think of the native app for the mobile device as the customer service counter at your local department store, its a friendly and welcoming interface put in place to get you to the information you seek, quickly and efficiently. That's pretty much what your native application would be doing, if constructed with portability in mind. Which means you build a customer service counter for all different devices, while the PHP web-based application would become the tie in for all these devices onto one main source of information, your web server.
There are many ways to build both web-apps and mobile-apps, and even more ways to make them all interoperable. How you build the entire system from the floor up will definitely have an impact on the scalability, administration and interoperability and overall usability of your application.
Regardless of the avenue you plan to take in the development of your application, the core question must be answered. What purpose does this application serve or what need does it meet? By answering this simple question, your answer will present itself, as to what tools to use in the development of your application.

Which Platform to choose Ruby on Rails or GWT?

I have a need to create a web2.0 application with the following features:
UI screens
Integrate with a forum framework
Integrate a blogging framework with the application
Real time chat application (Optional)
Integrate with a email server
Based on your previous experiences, please suggest good frameworks, toolkits, etc which can help me build this app quickly in with following criterion
ease of use
features richness
Can people suggest me the advantages/disadvantages of choosing GWT over Ruby on Rails.
Also if you believe any other platform like PHP is better please suggest me on that too.
Thanks
Try jRuby on Rails ... you get the ease of Ruby and Rails ... and all features and libraries of Java.
GWT is quite interesting in a sense that you can use on client-side regardless of the backend technology. So comparing it directly to Ruby on Rails isn't much fair because ROR is a full-stack solution (except javascript libraries for UI work). Still, in your case, if you want to use GWT, you should be clear with the following points:
You'r comfortable with Java
You app is purely web 2.0 (means no more than different pages than can be viewed as different modules)
Forum, mail server integration won't pose any difficulties
You have a bit more time for development
I would suggest that if any of the above points don't work out for you, then you should move to ROR. Now why I built a checklist based on Java? Because you'll find quick development tools like "Spring ROO"(yes, Spring Roo is the smartest code generator) and scalable, integrable, full-stack technologies like "Spring" in Java. And Spring supports the development of everything you've mentioned. And even if you think GWT won't suffice your needs(in terms of short development time) then you can easily go for JQuery and it's Spring glue library to develop UI stuff.
P.S: Spring Roo 1.1.0.M2 and GWT 2.1 have been integrated to reduce development time many folds but it's not production ready yet.
If you are into java: have a look at grails, its based on a bunch of well known java frameworks like spring and hibernate. You can combine Java business logic with easy to write groovy code.

Categories