Closed DominikGuzei closed 8 years ago
What's the status here @darko-mijic ? Are we leaving this open while migrating the other packages and apps?
@Sanjo thoughts on this?
We should migrate all dependent packages first. There are too much packages dependent on the develop branch of base. VOs would brake if we merge this now.
@darko-mijic So it's not backwards compatible? Whatever the case be good to keep any specific discussion relating to a PR in the PR so it's easily reviewed
Registering a type causes an error. Like Password.type('Password');
.
I think we should accept this breaking change and avoid introducing messy code for backwards compatibility. Especially since we have other breaking changes like serialization...
It's important we get this merged now. Maybe we can divide up the packages to migrate?
Readme needs to be updated and code snippets from Dominiks first comment added.
This PR introduces a backward compatible way to define classes with fully qualified class path like this:
or like this:
which does a few things for us:
Space.Namespace
with the pathMy.custom
FirstClass
which is attached to the namespaceFirstClass.classPath
andFirstClass.toString()
returns the full path'My.custom.FirstClass'
FirstClass.type('My.custom.FirstClass')
from our code (this is done bySpace.Object.extend
now)if you use Coffeescript with the
class
syntax, you still have to call@type 'My.custom.FirstClass'
though since we have no control over the extension process there.