Today is blackout Wednesday. Many sites are blocking content, or blocking entire sites altogether. Places like Wikipedia and Wordpress and Reddit are all blacked out today. Others like Google are blacking out logos but still providing the services. (BTW, those sites are really not completely blacked out, from what I…
This past week I have spent time thinking on some of the best applications I have built, and some of the "neediest" applications I have built. Some of them are in both columns. And I am sure this is the case with most developers. Some times, we get to be…
As the past year ends for most people, and as the new year picks up, many people are hopeful. Some more so than others. Some of the people that are focusing on a great New Year is the workers at Facebook, with their soon-to-be IPO, which they are hoping the…
It has been a while since I have written anything. I have been so busy that I have barely been able to catch my breath. But that just means that all of my thoughts have been festering for a while and now I get to share those with the web.…
So today is the WWDC kick off, and we learned that Apple is going to release the new OS and mobile OS later this year. Why should this be important to anyone? Because it is starting to get the thought that not everything should be static and stuck at one…
Now here is the part where I give the example files. After we have planned the application functions, we need to figure out what we are going to return to the client. This is going to be a standard array with at least two levels: The Response array and the Data array. It will look similar to this:
Array
(
[responseMsg] => Array
(
[status] => ok
[message] => Service call was successful
)
[allColors] => Array
(
[0] => blue
[1] => green
[2] => black
[3] => white
[4] => yellow
[5] => red
[6] => beige
)
)
Now that we have the basic idea, we need to create the WSDL file. Remember, it is very important to think of WSDL files as of reading from bottom to top. The final WSDl file is located here. Here is the basic idea of the WSDL file I created (going from the bottom to the top):
Service: This houses the binding, the location, the port, and the name.
Binding: This houses the functions that will be exposed, the operation and the input and output encoding. Most of the time these will be similar with only the names being different.
Port Type: Here is where I define the operations and the input/output definitions
Message: These are individual nodes for the Request and Response messages for all functions. These will usually have two message nodes per function, and they will define the structure for each action
Types: This defines each structure that has been mentioned in the Message and any subsequent structures that have to be defined. This is usually the area where most struggles occur.
This structure will be encompassed by schema target namespace
Import the XML namespaces to help build the structures in the reasponse
For each complex type, it should either mention a specific data type (xsd:), or a new defined structure (tns:)
Each structure that is an array should be defined as a SOAP-ENC:Array with a wsdl:arrayType parameter
So that is the WSDL. The one I have created defines the 2 functions, the input, the output, and the structure of each. Now we can move on to the Server code. (more…)
CakePHP offers a good selection of tools to help you retrieve the data. Recently, I came into a situation where I needed to find and paginate results based on a single, distinct column in the table. Distinct data can be tricky, especially if the tools do not allow you to…
Today's topic is kind of short, but a very important one. If you are not living under a rock, then you know about Sony's problem with their Playstation online services getting hacked and being down for some time. A new concern now is that this has exposed the credit card…
Social networking, check-ins, friending, linking-in, and other items have made for an interesting world. Some people may see this as a purely consumer/individual niche, with only the younger crowd getting into this new fangled technology. The internet has been around for a while and people sometimes have a hard time…
CakePHP is one of those frameworks where it is easy to set up and get an application running in a minimal amount of time. It provides different securities, helps, and functions in the framework so that your application can run smoothly and be safe. As with all applications, the level of security and functionality depends on the developer, not the code, not the language, not the database. An application is only as secure, functional and reliable as the person/team who is coding it. One of the reasons I do like Cake is that the built in security and helpers offer a developer a great way to secure data, validate it, and display it. And that can also be one of the more trickier parts of getting the application to work correctly, finding the data to do something with it.
CakePHP provides some functionality for finding the data, this is done using the “find” method. You can read more about this at the Cookbook. Using this, one can grab data from many different tables if needed, or just one table. For this exercise, I am going to use dummy data to show how to find data, using simplistic finds, and using joins, and sub-queries. So first lets examine the data tables. Not all of these are going to be connected. This is a very simplistic, quickly drawn up solution to a lending library