Question about SDK's - php

I am not sure if this is a stupid question or not.
I have been working with Mongodb and found myself writing the same logic in different applications for simple stuff like selecting collections and drop them etc.
If I made some classes based on the datamapper pattern using all the Mongodb functions would this be a basic SDK ?
If I am totally wrong could someone help me out in defining a SDK ?

I think you're creating a reusable library or if you are getting a bit more ambitious an application framework.
My understanding of an SDK is that it would have the tools (eg. compilers, WSDL pre-processors) necessary to develop applications, whereas the Runtime Environment would just have what you need to run the developed application. Contrast a Java JRE (VM, standard libraries) and JDK (compiler etc.) When we develop for specialised platforms (eg. smart phones) we often have in the SDK an emulation of the target platform to allow us to test our code on our workstation.
I don't think you should be concerned as to whether or not you are building a framework or an SDK, rather be concerned about if it will be useful to other developers. If you say to them: "download your standard Java JDK, + standard mongodb + my excellent framework) you may well help them a lot. I would view something such as Spring as having started like that, and look what happened to that.
Once you start packaging other stuff with your framework, with the objective of making the developers initial download simpler you buy into a world of maintenance issues, when will you release a new version of your package? What happens when fixes are needed for packages you include.

Software Development Kit
A software development kit (SDK or "devkit") is typically a set of development tools that allows for the creation of applications for a certain software package, software framework, hardware platform, computer system, video game console, operating system, or similar platform

Related

PHP Workflow Engine Framework

Is ezComponent Workflow still actively being developed? I've downloaded their code and attempted to get everything working (using postgres db, php 5.4), but it continually fails with their sample code. That being said, are there any mature PHP based Workflow Engine implementations out there that you can recommend?
ezComponents are now known as Zeta Components.
See http://zetacomponents.org/ -- Quote: Zeta Components originally were developed by eZ Systems under the name "eZ Components" and was generously sponsored to the Apache Software Foundation for further development. Since 07/2010 the components are known as "Zeta Components"
This would explain why you're not seeing any updates to the main ezComponents site, because all new development work is being done under the Zeta Components project.

How to to manage & develop big TYPO3 projects?

I am developing TYPO3 projects since 2006 now, and projects are getting bigger and more complex. Setting up a simple CMS site with a contact form and news listing is all routine.
Right now, we finished a bigger project: A platform for an international company with countless extensions:
Login & registration, news, listing database records, dynamic contact forms, surveys & statistics, intranet functions: document upload & download, several backend "tweaks" per TCA modifications, etc. .
The project managers got upset at us developers, because sometimes, after we finished on function X and later committed function Y to the dev server, function X was broken. This was related to typoscript settings, extension interdependencies, versioning errors or sometimes simple programming mistakes and typos.
I know how to take care of the latter, but in general:
From your experience:
How can we develop an error-proof system in TYPO3, where everything works in hand and extensions don't get in their way? In other words:
How can we secure and isolate functionalities (extensions) - and avoid those interdepency issues?
We are working in a DEV team with two developers, and we already use:
Subversion Repository
Local DEV server for development & testing
External typoscript configuration files, split into single files for each extension
Edit for Bountyhunters:
What I am looking for is a best-practice-summary that might include these topics:
General workflow habits
General coding habits
Reliability of our subversion commits (or Git)
Unit testing (PHPUnit, Selenium?)
Deployment (I haven't yet figured out how automated deployment can
help us)
Typoscript best practices
Problems we could find in large TYPO3 projects are not to much different from any development project.
General practices :
configure continuous integration platform with continuous deployment tools;
Test Driven Development with automated testing;
robust architecture (dB, URL routing, ...);
performance tests during development;
use versionning with formatted comments;
use powerful IDE as PHPStorm, Eclipse, Netbeans;
Common TYPO3 practices :
use official API;
follow TYPO3 API code guideline;
use TYPO3 hooks where You can if You need to modify the logic of Core or 3rd party extensions;
use TypoScript constants to separate data from logic in Your configuration;
Additional references :
TYPO3 Best Practice Workshop
TYPO3 Best Practices (de)
TDD & Best Practices mit TYPO3 (de)
Extensions could help to manage complex TYPO3 installation :
caretaker
additional reports
Use modern project management methodologies & tools
Scrum, Kanban, lean developement principles
Bugtrackers as Redmine, Trac
Books :
php|architect's Guide to Enterprise PHP Development
I absolutely recommmend start using PHPUnit for unit testing, but remember unit testing is really about how you create the code in the first place, not usually something you add later. But of course, better late than never.
You should consider setting up a build server like jenkins/hudson or atlassian bamboo. The latter is quite nice and integrates with zend studio which in my opinion is the better choice when developing in PHP. In general the atlassian products are widely used for software projects. (Jira + confluence + greenhopper in particular)
I would also recommend setting up phpunit on jenkins - see http://jenkins-php.org/ as a template, although I've read good feedback about Teamcity. Then, depending on the code you write you setup unit tests (for raw php code, maybe a bit with of mocks), integration tests (API and module connectivity) and system tests (selenium).
Once you have it running after each build you can be sure that at least covered functionality is working. The problem however is that you will spend more time on writing tests and their support as well as thinking about testable code. Also keep in mind that you cannot cover everything - thats not the point. You must have critical paths covered.

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/

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.

How do you handle library dependencies during deployment using PHP?

this is a question on PHP mainly. I was wondering: How do you make sure that all necessary libaries are packaged with your application when you do a deployment to (production) servers?
A more concrete example: I have an app running on Zend Framework and each time I roll the application to a server the deployment process creates a fresh "installation" on that system. Therefore, I need to bundle Zend Framework together with my application and then copy the files to the right places together (it is done automatically). Currently, I am using a svn:externals definition to get the files out of Zend's SVN system during deployment, however, I don't want to rely on that SVN and I also don't want to put traffic on external SVNs with each deployment.
In the Java world, I am used to Maven which handles such stuff using central artifact repositries. I know that there is a Maven4PHP version, however, I am more looking for a PHP-based solution. Additionally, I don't believe that PEAR is a good way to go as it doesn't really fulfill my requirement of bundling the applicaiton (incl. libs) into a single deployable.
Is there some tool available already that I am not aware? Or do you have any great technique that I should know?
Thanks much for your help!
Michael
There's a build system called Phing which is written in PHP and based on Apache Ant.
I personally can very well live with externals.
I think the vendor branching would solve the problem from your example quite straightforward, but if you also don't like large repositories I'd recommended to keep watching on the modern toys like composer and what it solve(and maybe phark, I never heard before :) )
It isn't production ready yet but you might want to keep an eye on the Phark project. It is a port of Bundler to PHP.
While looking through the Simplify your external dependency management slides I came across a tool called pantr which can be used as a PEAR installer. pantr as PEAR installer which allows you to specify your dependencies in a project specific file.
The article Version Control != Dependency Management has some information about using the new PEAR installer called Pyrus

Categories