Update core data - objective-c

I relased version 1 in appstore that contain coredata database , in version 2 I added new fields to the database how to modify dynamically the old database , with keeping the data
I already did without versioning and don't have the old version , and the application will crash on the customer ipad
any suggestion please

take a look at the Core Data Model Versioning and Data Migration Programming Guide

I would encourage you to start using source control. XCode 4 has SVN and Git built in, you should give it a try - both are pretty easy to learn, and prepares you for when you need to have multiple people working on a project. Having your code in source control would have made this a straightforward problem to fix, you can get previous versions of any file at any point in time.
The WWDC 2011 videos have some good content on using source control effectively and efficiently as well.

Related

How do I migrate from legacy visjs (4.21) to modern visjs?

I have working code written a couple of years ago using the old version of visjs (https://almende.github.io/vis/). I would like to switch to the new code base (https://visjs.org/).
My code uses Network, Timeline, Graph2D, and Dataset/Dataview.
Are there any instructions on migrating code from the old version to the new one?
Things I have found, so far:
vis.moment is now moment from moment.js (with some minor changes in default parameters)
network has moveNode (which is much nicer than the old way of updating x/y in a node).
I needed to set a scale for the timeline to get around the problem of too many grid lines.
I would be happy with something that discusses migrating from 4.21 to 5.0.
My current issue is with getting the Timeline to show up,
so a migration guide for Timeline would be most appreciated.

What happen if I forgot to add Core Data when creates the project in xcode 7+ ,ios 9,with Objective C [duplicate]

This question already has answers here:
Adding Core Data to existing iPhone project
(13 answers)
Closed 6 years ago.
I have an ios project written in objective C. When I create the project I forgot to add core data (absolutely at that moment I create the project, I didn't have a need of core data and now I want). so is it a matter with Xcodee 7+ and if I add now core data to my project, can I continue with the normal way. Or else do I have to copy & paste files from a project which created with core data. Searching for a better and easy way to do this.
how can I do this.hope your helpful answer with this.
If you select the use CoreData option in the new project wizard, it just puts in some boilerplate code and includes the CoreData framework in your build settings. You can do this after the fact with no problems.
There are plenty of tutorials that will show you how to do this as well. They are easy to find with a cursory google search.
If you don't want to go through the trouble of finding a tutorial, the easiest thing to do is create a new project with CoreData and add the pieces in that project that are missing in yours (last time I looked at the template project, most of the CoreData code was in the app delegate, and of course you'll need to add a data model file).
UPDATE: Removed link to first tutorial I found doing a cursory google search, since it is no longer available.

Dynatree or Fancytree for production?

I am looking for a javascript solution which can unordered list to a treeview with checkboxes.
So far the best one I have seen is Dynatree. However, looking at the page and the fiddle , I learned that there is a designated successor named Fancytree.
I am planning to implement the solution in a production environment.
Which is the best library to use?
As of today (nov. 2013) Dynatree is the stable version.
While the core functionality in Fancytree is already pretty stable too, there still may be some changes to the API and markup. I am planning to release Fancytree early next year.
So if you want to be on the save side, use Dynatree.
If you are fine with core functionality, want to help to test and improve this open source project and are ready to modify your code every now and then: use Fancytree.
(Disclaimer: I am the author of both.)
Update 2014-05-01
Today I released v2.0.0
Dynatree is EOL. Last commit was on 19 Aug 2016.
I will support Dynatree for a while, but no new features will be added.
It is recommended to migrate to Fancytree. It's easy: see also the migration hints.
Src

How can multiple developers efficiently work on one force.com application?

The company I work for is building a managed force.com application as an integration with the service we provide.
We are having issues working concurrently on the same set of files due to the shoddy tooling that is provided with the force.com Eclipse plugin. If 2 developers are working on the same file, one is given a message that he can't save -- once he merges he has to manually force the plugin to push his changes to the server along with clicking 2 'Are you really sure' messages.
Basically, the tooling does a shoddy job of merging in changes and forces minutes of work every time the developer wants to save if another person has modified the file he's working on.
We're currently working around this by basically 'locking' individual files by letting co-workers know who is editing a file.
It feels like there has got to be a better way in this day and age. Does anyone know of a different toolset we could use, process we could change, or anything we can do to make this easier?
When working with the Force.com platform my current organisation has found a number of different approaches can work depending on the situation. We all use the Eclipse Force.com plugin without issues and have found the following set ups to work well.
We have a centralised version control system that we deploy from using a series of ant commands to a developer org instance. We then depending on the scope of the work either separate it off into chunks with each developer having their own development org and merging the changes and testing them regularly, or working in a single development org together (which if you have 2 developers should be no major problem) allowing you to have almost instant integration.
If you are both trying to work on the same file you should be pair programming anyway, but if working on two components of a similar system together, sharing the same org can allow you to develop in a fast and flexible manner by creating the skeleton of the system you wish to use and then individually fleshing out the detail.
I have used both methods extensively and a I say, work really well depending on the situation.
Each developer could work in separate development sandbox (if you have enterprise edition, I think 10 sandboxes with full config & limited amount of data are included in the fee?). From time to time you would merge your changes (diff tool from any version control system should be enough) and test them in integration environment. The chain development->integration->system test->Q&A-> production can be useful for other reasons too.
Separate trick to consider can be used if for example 2 guys work on the same trigger. I've learned it on the "DEV 401" course for Developers.
Move all your logic to classes. Seriously. They will be simpler to unit test too.
Add custom field (multi-select picklist) to User object. Values should be equal to each separate feature people are working on. It can hold up to 500 values so you should be safe.
For User account of developer 1 set "feature1" in the picklist. Set "feature2" for the other guy.
In the trigger write an if that tests presence of each picklist value and enters or leaves the call to relevant class. This wastes 1 query but you are sure that only the code you want will be called.
Each developer keeps on working in his own class file.
For integration test of both features simply set the multiselect to contain both features.
I found this trick especially useful when other guy's code turned out to be non-optimal and ate too many resources. I've just disabled his feature on my user account and kept on working.
This trick can be to some extend applied to Visualforce pages too (if you can divide them into components).
If you don't want to waste query - use some logic like "user's first name contains X" ;)
We had/have the exact same problem, we have a team of 10 Devs working on a force.com application that has loads of apex classes (>300) and VF pages (>300).
We started using Eclipse plugin but found it:
too slow working outside of the USA each time a save is called takes > 5 sections
to many merge issues with a team of 10 developers
Next we tried developing in our own individual sandboxes and then merging code. This is ok for a small project but when you have lots of files and need changes to be pushed between sandboxes it becomes impossible to manage as the only thing worse then force.com development tooling, is force.coms deployment/build tools. No automation its all manual. No easy way to move data between sandboxes either.
Our third approach was to just edit all our VF pages and Apex code in the browser. (not using their embedded editor that shows up in the bottom half of the page because that is buggy and slow) but just using the regular Editor under setup > develop > Apex classes. This worked ok. To supplement this we also had a scheduled job that would download all our code and save it into our SVN repository. We also built a tool that allow us to click a folder on our desktop and zip its contents and deploy it as static resources for us.
However this approach still has its short comings, i.e. it is slow and painful to develop in the cloud, their (salesforce) idea of Development As a Service is crazy. Also we have no real SCM we only have it acting as backups.
Bottom line is force.com is a CRM and not a Development platform, if you can? run, flee, get away from it as fast as you can. Using it for anything apart from a CRM is more trouble then it is worth. Even their Slogan "No Software" makes me laugh everytime
I'm not familiar with force.com, but couldn't you use source control and pull all the files down from force.com into your repository. Then you could all do your work, and merge your changes back into the mainline. Then whenever it's necessary push the mainline up to force.com?
Take a look at the "Development Lifecycle Guide: Enterprise Development on the Force.com Platform". You can find it on developer.force.com's documentation page.
You might want to consider working on separate static resources and pages and then just being careful when editing objects, classes etc.. If most of your development happens on client side code (page, staticresource, lightning component/app) you might be interested in this project: https://github.com/bvellacott/salesforce-build . In any case I strongly suggest using version control. If not on a server then at least locally on your machine, in case your peers overwrite your work.

Using Sculpture with NHibernate or Entity Framework

I recently ran across this open-source project: http://www.codeplex.com/Sculpture
Sculpture is a code-generator which allows you to design your domain model and then use persistence 'molds' such as NHibernate/EF and probably more to generate repositories. It takes care of all the mapping and Data access generation. It looks like it does a heck of a lot more, but i'm pretty much sold at this point. However, i would like to know if anyone here used this for real-world solutions. If so, how well does it scale? How did the generated DAL work for you?
We have taken this out for a spin on a new project we had. Always wanted to try out nHibernate but the XML hell of the config files always put me off. Tried a number of these type "helpers" this is the easiest to use so we decided to use it.
I like the facts that you can just point at databse and it will create object based on what it sees and will resync on demand. It was also good that you could add custom methods to these objects and has a very well written syntax for the generated code all using LINQ-To-NHibernate.
It also generated a respository project over the top to allow you to use this design pattern which we did (again another personal goal).
It all worked out very well, created a social (facebook like) site for people with a medical condition, got everything fully working in 3 weeks with onlt 3 people.
On the whole very happy with this - in fact bought a licence for Sculpture 2.1 Nhibernate mold. (note open source but not for nhibernate mold :-) )
There is room for improvement
Windows 7 64 bit had to run visual studio in admin mode (my pc only) - not sure why
TeamCity continuous integration had some issues with paths to dll files - the two generated project (ORm and Repository) use different paths to base dll's - so needed to work out position of source in filestore to automate the build but worked fine.
Would like to heard any views on this or other product which people think are better ..
Looking to do a project where we will create all the objects in sculture and get it to produce/update the database for us - will be odd as we are db type developers but will be good to see how this works..
Thanks
Simon
I would say that most ORMs are generated in some way at this point. I'm using Linq-to-SQL for a current project, you setup your model and generate code (with attributes from the model).
In short, it's nothing new and there's no reason to rebuff it just because it's generated.
Most ORMs can or do work this way, and they do so well.