ANN: DelphiMVCFramework 3.0 beta

In the last months some of the great 9 DelphiMVCFramework contributors from all over the world, have worked hard to release the version 3.0. Now it is ready to be tested!

dmvcframework

DelphiMVCFramework is one of the most popular RESTful framework for Delphi, so any change has been accurately considered and also its impact on the current 2.x projects has been take in consideration. There are a lot of new core features that will make even more easy to work on (and with) your beloved RESTful framework. Also, all these changes will make the framework even more flexible regarding the serializators even for custom types (yes, now you can register your custom serializer for your data types). Also, JSON is no more the only “built-in” supported format. Well, now JSON is the only format, but now is really easy to add to the serializers registry a brand new serializer which serialize in XML, YAML, BSON, CSV etc. The serializers are recicled between requests to get the maximum performances.

Considering that some often-used methods have been removed or refactored, we tracked all the breacking changes in a document, so that you can evaluate the impact that the new version may have on your projects.

Here the content of the document as it is today (the latest version is available here).

DelphiMVCFramework 3.0.0 breaking changes

  • RenderListAsProperty has been removed from TMVCController. You can set such kind of specialized serializations in your custom base controller.
  • RenderJSONArrayAsProperty has been removed from TMVCController. You can set such kind of specialized serializations in your custom base controller.
  • Render has been removed from TMVCController (was deprecated).
  • Render(TJSONValue) has been removed from TMVCController (use Render(TObject)).
  • Trying to deserialize a TJSONNull the target instance will not be freed anymore (consistency with serialize).
  • Context.Request.BodyAsJSONObject dosen’t exist any more. Use BodyAs or the following pattern to migrate.
JSON := TJSONObject.ParseJSONValue(Context.Request.Body) as TJSONObject;
try
  if not Assigned(JSON) then
    raise EMVCException.Create('Invalid JSON');
  // do something here
finally
  JSON.Free;
end;
  • TMVCConfigKey moved to unit MVCFramework.Commons.
  • TMVCMimeType was renamed to TMVCMediaType.
  • TMVCController.Render (no parameter method) do not exist anymore. If the return is a ResponseStream, use the RenderResponseStream.
  • TMVCController.PushJSONToView was renamed to PushToView and Removed SystemJSON dependency, use the ToJSON method if necessary.

As you can see, the breaking changes are very few and there are very low probabilities that will require you more than 10 minutes to fix them even in a big DelphiMVCFramework 2.x project. I did it for our biggest projects, and 10 minutes are largely over-estimated.

Beta Tests

For the next weeks/months the 3.0 beta version will be available for testing. If no major bugs will be found, the 3.0 will be merged in the main branch.

To test the 3.0 beta version you have to checkout the “pluggable_mapper” branch (clone the repo if you didn’t already, and then checkout the “pluggable_mapper” branch).

You can go back to the 2.1.6 (carbon) when you finished the test. There is no reason to be afraid about the changes. They are really in the deep layers and should not affect the “normal” services.

Happy testing!

Community

Considering all the help requests coming from the users (and the fact that facebook is not permitted in some companies) we at bit Time Professionals (the company which lead the development of DelphiMVCFramework and other open source Delphi projects) decided to create a specific community and leave the facebook group only for announces and polls.


So, if you need help about DelphiMVCFramework, LoggerPro, Delphi Redis Client, columbusegg4delphi, Delphi Event Bus, Delphi STOMP client, you can go to the bit Time Professionals WebSite and ask there. If you want to support the projects or you need fast responses, you can also subscribe to the “professional support” group (with a very low fee) and your requests will get priority upon the other by our engineers (which likely wrote 80% of the framework code). When possibile, the support team will send you a specific sample written specifically to show you how to solve your problem. The “professional” groups will be available soon. If you are interested about prices or other things related to the professional support, ask to professionals(at)bittime(dot)it.

Currently is just started, go to subscribe now!

 

DT

Comments

comments powered by Disqus