VerySimple Developer Blog
Technical Tips, Tricks and Rants.

Archive for the ‘Languages’ Category

 
Oct
14
Filed Under (Announcements, PHP) by Jason on 14-10-2007

We are proud to announce the release of Phreeze Framework for PHP.  Phreeze is an open source framework that allows PHP developers to generate a working web application in just a few clicks.  The generated application includes ExtJS DataGrids with AJAX pagination and sorting and server-side validation implemented, and a forms with server-side input validation.

The ORM component of Phreeze has been developed internally by VerySimple over the course of five years and powers several of our client’s web applications.  Phreeze powers several of our clients’ web application and has proven to be an efficient and stable ORM for large datasets and high volume usage.  The MVC component of Phreeze is a new addition, but is already stable for production use.  The MVC uses Smarty template engine for view rendering, which is easy for developers and non-programmer designers to customize.

Basic API documentation and a support forum is currently online.  Tutorials and examples are coming soon.  The code is licenced under the LGPL which means you can use it for any purpose for no charge -including commercial applications.  A video demo is also available if you want to see an application being generating before you try it.  Phreeze is now a community project so please feel free to pitch in with any ideas or suggestions.

 

 
Jul
08
Filed Under (.NET, Announcements) by Jason on 08-07-2007

The dreaded “NHibernate.MappingException: Unknown entity class” exception thrown by NHibernate in your .NET web application indicates that the class you are trying to map in your .hbm.xml file cannot be located for some reason.

The first thing to check is to right-click on each of your .hbm.xml files and make sure the Build Action property is set to “Embeded Resource.” This tells .NET to compile the mapping file into the Assembly .dll

If you confirmed that the Build Action is correct then for some reason NHibernate cannot locate your class within the project. Double check that the path to your class is correct. If you’re building a .NET 2.0 website and your model code is inside the App_Code directory, make sure that you have specified the Assembly name of “App_Code”. The .NET framework automatically creates this assembly name for your web project.

 

 
Apr
18
Filed Under (.NET, Announcements) by Jason on 18-04-2007

I recently had some trouble with the .NET AJAX Toolkit AutoComplete Extender which did not seem to be working despite copying all of the code directly from the documentation. I discovered two missing pieces that were not obvious (to me at least).

The first is that I was trying to use a ServiceMethod without a ServicePath - according to the documentation this should allow using a method within the same aspx page as the callback method. I would imagine that this could work however getting the aspx page to act as a web service wasn’t critical for my purposes and so I didn’t try very hard to get it working. Instead I wrote a separate web service class for the callback as is shown in the documentation.

The second issue had to do with the .NET attributes that must be included. The documentation provides the following example for the method (note the “WebMethod” and “ScriptMethod” attributes):


[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod]
Public string[] GetCompletionList(string prefixText, int count) { … }

What is less obvious, however, is that the web service class is required to have an attribute as well. A “ScriptService” attribute is require like so:

[WebService(Namespace = "http://www.verysimple.com/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.Web.Script.Services.ScriptService]
public class AutoComplete : System.Web.Services.WebService

I found this useful bit of info in the development forums but it would have saved me about four hours of suffering if it was just included on the example page. Simply adding this attribute solved all of my problems and the autocomplete extender worked perfectly

In the process of solving this error, I used a handy utility by the name of Fiddler which allows you to spy on all of the HTTP traffic. I had initially suspected that the autocomplete javascript was simply not making the AJAX post because I couldn’t detect any activity using a javascript debugger and no javascript exceptions were being thrown. Using Fiddler, I saw the post was in fact being made. This is extremely useful for AJAX applications because you can see the raw output of the web service as it is being requested - which in my case contained some run-time errors. The autocomplete control seem to just quietly choke when the webservice fails.

One thing to note about Fiddler is that, though it works with any browser, only IE works right out of the box without some manual configuration. I put my other browser away for a bit and used IE. Another useful tip is that Fiddler didn’t seem to intercept traffic when using “localhost” as the hostname. When I used my local IP address, however, (for example 192.168.1.25) it worked perfectly.

Please feel free to post any comments. In particular I would be interested to know if you are able to use the aspx page as the ServiceMethod without creating a separate web service.

 

« Previous Entries Next Entries »
Close
  • Social Web

NOTE: Email is disabled

E-mail It