Migration from angular 1.2 to 1.5 - angularjs

Currently I am using angular v1.2.26. When I upgraded it to v1.5.0(or v.1.4.8), the application stopped working.
What are the changes in the existing code of v1.2.26, I should not be missing, to make the application work?

There's now a guide available https://docs.angularjs.org/guide/migration - probably slightly less tedious than reading every single ChangeLog

Migration Guide - https://docs.angularjs.org/guide/migration
See the change log
https://github.com/angular/angular.js/blob/master/CHANGELOG.md
An easier way is to see where your code fails, debug a bit and hit the nail. There are no huge changes between the versions in question.

Although, your question is not a good candidate for StackOverflow questions but you should read the ChangeLog to see the breaking changes and fixes in each release after v1.2.26 to v1.5.0.
See the changes https://github.com/angular/angular.js/blob/master/CHANGELOG.md

Please take a look if this may help you:
http://www.diatomenterprises.com/migration-history-from-angularjs-1-3-to-1-5-and-then-2-0/
I can assist you in migration from 1.3/1.4 to 1.5 since did it a few times on different projects and all went smooth. Of course there're some tricks to do, but in general nothing breaking.

Related

Joomla Site very slow

i'm struggling onto a problem that i can't find a way ti fix. I'm currently running joomla 3.4.5 and a gantry based theme. I tried minifying CSS, JS and HTML and also optimize the images with the google insight tool.
i've done a debug system and it shows that
Application: beforeRenderModule mod_rocknavmenu
implies 21.7 seconds ..... I think that is the issue .... how can i solve that?
The site is this
Thank you for your supoprt
I would guess the site is slow due to your hosting.
Also news01.png and news02.png are taking several seconds each to come through.
Update all of your extensions, out of date extensions can impact performance.
Check your slow query log, CPU, and memory usage on your server. Those will tell you more about potential issues.
Found realy easy solution - just disable System - Model plugin

angular: using restmod as an alternative to restangular for rest operations

https://github.com/platanus/angular-restmod seems much clearer to me than restangular but I can't find much info about it - has anyone used it, know of any pitfalls, etc.?
For instance, I can't see support for PATCH for partial updates. Any and all info is welcome.
We are using Angular Restmod in various projects in production and I can tell you it does what it says it does.
Take a look at the issues in Github, there's a lot going on there right now.

Cake PHP v0.2.6 from 2006 - site questions

Today I was asked to work on a site using cake. This site appears to be using ake version 0.2.6 from 2006.
This site was build by a college student. Its convoluted to me.
I would like your pro tips on IF We should attempt to upgrade, or start fresh.
My real issue is that I have NEVER worked with Cake. EVER!
I am afraid that If I start this work i would not be able to finish it.
It also uses an extreme amount of SOAP.
Please advise.
If the cake version is too old like that, I recommend to start over. The newer versions have made a lot of improvement and upgrading from that to say version 2.3 I think just isn't worth the trouble, really.
Besides, if you've never worked with cake, I think you'll get confused trying to make v0.2.6 to 2.3 because of all the changes. It'll be a testimony to your courage not to throw the towel.
If you decide to start over, you should consider if cake is the right thing for you (you'll have to do a revamp of everything, you might as well consider other fw options). The great thing I found when I started working with cake was the documentation, so you'll be fine if you maintain that path.
And SOAP... it should consume SOAP ws or make them available? I've work with cake & soap, so it's definitely doable, but you also have to take that into consideration and see if maybe other framework will make that work easier.
So, conclusion: start fresh, almost always good :)
And investigate a little bit around to see if the new version of cake is the right alternative for you based on your needs (no one really can decide that except for you).

migrator.net vs fluentmigrator vs migsharp

I am currently investigating possible options of a migration framework/tool. I like the idea of ruby migrations on which the above frameworks are based.
So I am asking for your experience, opinions and maybe a comparison between them. Are you using them in production?
thanks for responses. The goal of this question was to get a feeling about which tools is used most in the developer community but it seems that migrations are not a hot topic here.
Anyway, I have decided to go with MigSharp as the codebase seem to be pretty clean and it is quite easy to handle and had build in support for MS SQL CE. Second runner up would have been FluentMigrator where I was not able to produce a working example for compact edition.
Cheers
I use FluentMigrator in production, and am a longtime contributor to FM. I think your question is to general; be more specific. Also, FM has a google group which is fairly active if you want FM information.
FM is derived from migrator.net, as I recall. It uses a fluent-syntax, and supports multiple databases. We have taken some inspiration from rails migrations, but it's definitely not a port. Worth checking out.
One thing I've learned is not to put your migrations in the same assembly as you app code. Separate them into a migration assembly, and use that for migrating your databases.
Also, you should always work on multiple environments to avoid problems with migrations run straight against production. I always have at least a development and production environment, and most of the time there is a testing environment as well.
I use mig#.
It works well, but you will need to have some guidelines for usage - as migrations can get complicated.
We use sequence number on the end of our migrations rather than a date-time stamp. This is because we don't know when the date time stamp was set (when they begun the source code change-set; just before committing; some time inbetween) different developers could use different approaches.
Names such as Migration_0000034.cs give you plenty of space.
At this point, I would stick with migrator.net. I like the promise of FluentMigrator, but it seems to not have any better active development than migrator.net (see the issues and pull requests that have languished on their github site).
There is also no easy way to do an ExecuteScalar(). I'd add it, but I don't want to create my own fork, and I see no reason that a pull request would actually land in the master. (Execute.WithConnection is an Action so it will fire on demand rather than when I need it to fire)
So for me, I'm heading back to migrator.net.

Migrating from Cake 1.3 to 2.0 and beyond - migrate existing, or only use for new?

I'm nearling completion of my first CakePHP-driven website and just saw they're already working on CakePHP 2.0 (not the stable release yet).
My questions:
Is it incredibly time consuming to move to a new version of CakePHP (when it becomes the "stable" release that is)? I know they have migration guides, but - I've never used a framework before, so I've never had to migrate anything.
Do you migrate your code for existing projects, or leave it as is and use the new stable version for future projects only?
Where can I find what version of CakePHP I currently have installed? I've looked at the LICENCE and VERSION files, but cannot find the installed/current version listed in them.
These seem like simple questions, but I greatly appreciate any thoughts/advice - searching this on Google just brings up how-to-migrate pages, not pros/cons...etc.
I've migrated a few sites from CakePHP 1.2 to 1.3. In my experience, it takes 2-3 hours on sites that have 5-10 controllers and no custom plugins, etc. I find I typically only have to change the syntax on a handful of function calls, and when I figure out which ones, it is just a matter of doing a find / replace across the site. Of course it could be more of an issue going from 1.3 to 2.0, but I don't get the sense that it will be an especially drastic API change.
UPDATE: I'm now in the process of migrating to CakePHP 2.0 beta, and thought I should update this, as I'm finding the updates are more extensive and far-reaching than I had assumed when I wrote this. Migration guide here: https://github.com/cakephp/docs/blob/master/en/appendices/2-0-migration-guide.rst
ANOTHER UPDATE: Since people seem to be finding this useful, I just thought I'd point out that Cake now helpfully provides an upgrade shell that does some of the work for you. Note that although the documentation says it will do "most" of the work, I have found there are still quite a few function calls, etc. that will need to be updated manually (see migration guide).
http://book2.cakephp.org/en/console-and-shells/upgrade-shell.html
As dhofstet said, it will all depend on the size and complexity of your site.
Whether you upgrade at all is usually a judgment call, but sometimes you have to (e.g. Cake 1.2 has some code that will break if your host upgrades to PHP 5.3). You certainly wouldn't have the kind of security issues that an old WordPress, Drupal, etc install would have. I have seen some noticeable speed increases with Cake upgrades, so depending on the situation it could be worth the trouble just for that (Cake 2.0 finally drops PHP 4 suppport). Look at the release notes and see if there are things that appeal to you in the new version.
To see your version, in the cake/VERSION.txt file, look at the very last line. It's easy to miss, but it should just be a number, e.g. 1.3.8.
This question is difficult to answer as it depends on the size and complexity of your project(s). The "big" releases (from 1.1 -> 1.2, 1.2 -> 1.3, 1.3 -> 2.0) usually break stuff and so you have to budget some migration work. The migration between "smaller" releases (for example from 1.3.9 to 1.3.10), on the other hand, is usually easy, often it just means to replace the cake folder. In both cases it is useful to have tests.
I migrate the projects which are actively maintained.
You can find the CakePHP version in cake/config/config.php
I'm migrating an app 1.3»2.0rc1 right now and I got no big trouble.
I had to change names of folder/files, eg. app_controller.php » Controller/AppController.php
Follow the migration link (tmp link) http://book2.cakephp.org/en/appendices/2-0-migration-guide.html
plugins/components/.. from various source won't work (at minus, for point 1)
To update the code (which in my case wasn't needed as the app worked well) I've shell-baked a dummy table and looked at differences in code.. It's a good starting point
Authentication/Authorization changed in some config, but requires few changes.
Trees still working
Acl don't. But I'm quite sure it's my fault.
For now it's all, good work!

Resources