.NET 4.7.2, WPF
I have an old project which used Catel 4.4.0. I need to update it to the latest .NET and package versions, so I'm moving it to Catel 5.0.0 as a first step. (I will eventually move it to the latest version.)
My Models under Catel 4.4.0 where all derived from SavableModelBase which included serialization and validation. For 5.0.0, it looks like you can have a SavableModelBase or a ValidatableModelBase, but not both. I decided to change all my classes to use ValidatableModelBase as validation is significant in my project.
I searched for examples of Loading/Saving Models with Catel 5.0.0, but the few examples I found appeared to be using pre-5.0.0 code.
https://docs.catelproject.com/vnext/setup-deployment/update-guides/catel-5.0/
https://catelproject.atlassian.net/wiki/spaces/CTL/pages/15630363/Serializing+data+from+to+disk
I used to be able to use:
myModel.Save(myStream, SerializationMode.Xml);
MyModel model = MyModel.Load(myStream, SerializationMode.Xml);
but, of course, all that has changed with 5.0.0.
Does someone have a reference to loading and saving Models with Catel 5.0.0? Should I be doing this in generic Microsoft .NET code? My concern is I have users with existing data files which must be compatible with the updated software.
If you have any questions, please let me know.
thanks,
randy
The SavableModelBase became just a wrapper with 5.0. The ModelBase uses ISerializer and you can simply pass in the models to the serializers (e.g. IXmlSerializer).
I recommend to upgrade to 5.12 immediately, it will save you some headaches.
Related
I have a WPF application built on .Net 4.8, Prism and Unity, using PackageReference in the project files. Every once in a while I update Nuget references to the newest ones. The packages related to Prism and Unity repeatedly have been a pain in the arse.
Now is such a moment again. Or rather, the past DAYS. I am trying to use packages like
Prism.Wpf 7.2.0.1422
Unity.Container 5.11.8
I keep bumping into the dreaded "The located assembly's manifest definition does not match the assembly reference", again & again in various variations. Seeing warnings like "Found conflicts between different versions of ... that could not be resolved", or "explicit binding redirect on ... conflicts with an autogenerated binding redirect".
I have been tinkering with this a lot, checking a whole dependency tree, removing, adding, or changing redirects, adding or removing packages. Of course searching on the web. It has driven me nuts. How to get out of this, and prevent it for the future?!
I don't know if this is combination of bugs somewhere, or just me not understanding how to use it. So I will put this as a question.
How on earth am I supposed to get things working?!
Set AutoGenerateBindingRedirects or not?
Set explicit redirects or not? If so, for which versions, to which other version? What about the publicKeyToken?
What about testing projects using MSTest, Moq, Appium, do they need a different approach?
Frankly, I was under the impression that using Nuget to install packages would just take care of all that, particularly using PackageReference. Well apparently, it doesn't.
I am at a loss. Is there anyone who can direct me to a valid approach?
Thanks in advance!
I want to upgrade Ext-4 to Ext-6 library and We want to change the theme of the form to Triton in project.
Here is official Sencha's guide on migration from ExtJS4 to ExtJS5, using Sencha CMD:
https://docs.sencha.com/cmd/guides/cmd_upgrade_five.html
And from ExtJS5 to ExtJS6:
https://docs.sencha.com/cmd/guides/cmd_upgrade_guide.html
Also, get to know what is Microloader, which is one of the major changes in ExtJS5: https://docs.sencha.com/cmd/guides/microloader.html
From my personal experience migrating from ExtJS5 to ExtJS6 was very painful. There's a lot of small caveats like, Ext.data.Store, in ExtJS6, starts loading data with delay, if config asynchronousLoad: false not specified. Generally, I would recommend you to look at release notes for every version of ExtJS, that was released after the version you currently use, although not every change will be specified there.
The CakePHP community has frequent minor release cycles. Can anyone suggest a strategy for selecting an LTS version - specifically a minor version.
Or would the best strategy be to upgrade as frequently as the minor versions are released?
We can assume that the 2.x and 3.x branches get updates for the next few years (i'm not sure, but i think even 1.3 still get security updates if leaks are found)...
So your choice is between 2.x and 3.x where 3.x is cleaner/faster and easier extendible in form of 3th party libraries and 2.x is more wide spread(plugins, tutorials,... ). I would definitely recommend you to go with 3.x due to a higher php version(it's sooo much faster).
Cakephp releases in minor versions (3.0.x) are bug and security fixes. So if you select:
"require": {
"cakephp/cakephp": "3.0.*"
}
you should be just fine for the next few years.
If you than feel like a feature is missing which is present in a newer 3.x release you can always find a migration guide for the newest version in the cookbook: http://book.cakephp.org/3.0/en/appendices/3-0-migration-guide.html as you can see from 2.x to 3.x there are a lot of breaking changes and an update is most likely really time consuming.
In comparison a update from 2.x to 2.6 is less complex as there are primary smaller feature improvements, renaming of functions and stuff like that: http://book.cakephp.org/2.0/en/appendices/2-6-migration-guide.html
CakePHP 3.0.x is the most current branch of CakePHP and if you're starting out with Cake is the best place to start (CakePHP 2.6.x is still being supported for the foreseeable future, but will eventually get dropped).
The recommended way of installing CakePHP is using Composer. If you want to install the current stable release then you want the following in your composer.json file:-
"require": {
"cakephp/cakephp": "3.0.*"
}
This will insure that every time you do a composer update you'll only get bug fixes and minor changes that shouldn't break your app. Ideally you want to ensure your app is bug free so it is a good idea to periodically update Cake with these minor version changes.
When CakePHP 3.1.x is released in the future it is likely to introduce new features that have the potentially to break an app's existing functionality. In this case upgrading needs to be done with caution. You will easily be able to update by modifying your Composer requirement, but the app will need thorough testing. This can potentially be time consuming, so unless you really need the new features is unnecessary.
I would highly recommend CakePHP 3.x if you are starting a new project. However, I was just at the CakePHP Conference in New York and the CakePHP Core Developers indicated they would be supporting 2.x for 2-3 years. That time period greatly hinges upon the community to some degree, they are not just going to stop supporting 2.x. any time soon. They are actually going to backport some of the 3.x features into 2.x. They tentatively plan to Release CakePHP 2.7 and CakePHP 3.1 sometime this summer.
I would also ask have you been using 2.x and what is your comfort level with CakePHP? Depends on the size of the project. I haven't made the jump to 3.x yet, haven't had a new project to try it on yet. I have a ton of code for 2.x like bake scripts and plugins that I have customized, so for profitability on a project I still might consider using 2.x.
There will be some learning with CakePHP 3.x especially if you are coming from 2.x, the ORM is awesome, but it much different than 2.x. So you have to weigh your options. They mentioned tools for upgrading from 2.x to 3.x that might help if you start with 2.x and jump to 3.x later. I don't think at this point I would do that, that is more for people upgrading from 2.x to 3.x. that have existing 2.x projects. I would pick a version and run with it.
The the other answers suggest use composer to install CakePHP. I started using composer about 8 months ago with CakePHP 2.x and love it. With CakePHP 3.x, I recommend using composer, like this if it is installed globally: composer create-project --prefer-dist cakephp/app [app_name]
currently I am looking for a new PHP framework, with which I can create some powerful business logic applications. I stumbled over ATK4.
Since yesterday, I am trying to get a grip on this, but I must say it seems to me that the whole framework and its documentation is in some kind of unstable - or at least very beginner-unfriendly - state.
I mean I tried doing the DVD Rental example (with ATK4.2) and there are so many errors coming up (I did it all according to documentation). Then I realized that there is a new release, 4.3, which I tried then. But same problem here: The beginner documentation (the examples from the book) have so many errors in it or there are so incomplete.
Am I too dumb to find a decent example or is this really the way it is with ATK? I mean I really like the concept of ATK but with this kind of documentation I would think it will be very difficult for new developers to start using this framework for new projects.
Update 2017:
Several parts of Agile Toolkit (ATK4) have been refactored into stand-alone frameworks. The issues OP have outlined with poor code quality and lacking documentation have been addressed and explained in READMEs:
http://github.com/atk4/data - Refactor of Model from Agile Toolkit
http://github.com/atk4/ui - Refactor of UI widgets from Agile Toolkit
Both libraries can be used in conjunction with any other PHP framework.
As author of the original ATK framework and now Agile Data / Agile UI - I am always trying to support the core code and publish it under permissive license.
I am using Sitecore Calendar Module 5.2 for Sitecore 6.5. I have been able to get it up and running. I am looking for some programmatic samples on how to read and display calendar events on a page. I haven't found any examples of this on Sitecore SDN or anywhere else either.
Thanks
I assume you mean version 2.4 which is for Sitecore 6.5. This module is designed to be more of a plug-n-play solution to a event calendars with Sitecore. You likely won't find any documentation on how to programatically do what you need because the module was built so you don't need to do that.
If you still want to write your own code to do these tasks, I recommend you take the following approaches:
Decompile the DLLs from the module and review the source code for the presentation components to see how they work. Based on that, you can write your own code as needed. If you don't have a decompiler, ILSpy is a great free one.
Or, just query the content tree for the event items using Sitecore Query or Fast Query based on the architecture that this module enforces for these new templates.