Skip to content

Loading…

PONSO - Type-safe, in-memory Plain Old NSObjects with relationships #60

Merged
merged 35 commits into from

3 participants

@nzhuk
Collaborator

Hi Rentzsch,

I've been playing with generation of non-CoreData data model I call PONSO (Plain Old NSObjects), which basically allows you to generate ObjC data models from Xcode data models. The main difference between existing "plain ObjC objects" templates is that it supports relationships and basic serialization/deserialization. And there's more, see README.txt file.

This is pretty huge set of changes so take your time to see if you're interested in pulling this. Shouldn't break the basic mogenerator and existing templates, though :)

Executive summary of this pull request:

  • Various small fixes in mogenerator source code, including 64-bit safety and deprecation warnings
  • Alphabetic ordering of attributes, relationships and fetch requests for stable code generation
  • Addition of PONSO code generation templates, PONSO support code and a sample project. See "contributed templates/Nikita Zhuk/ponso/README.txt" file for more info.
nikita-zhuk added some commits
@nikita-zhuk nikita-zhuk - "Modernized" Xcode project a bit:
- Updated Xcode project format to "3.2 compatible"
- Set Debug architecture to "Native Architecture of Build Machine"
- Set Release architecture to "Standard 32/64-bit Intel"
- Set compiler to LLVM/Clang
2288475
@nikita-zhuk nikita-zhuk - Fixed a compiler warning 39e563c
@nikita-zhuk nikita-zhuk - Specified explicit source file encoding - we assume it's UTF-8. Thi…
…s fixes a lot of deprecation warnings
34697d0
@nikita-zhuk nikita-zhuk - Fixed deprecation warnings - assume UTf-8 a6556ec
@nikita-zhuk nikita-zhuk - Deprecation warning fixes abaceea
@nikita-zhuk nikita-zhuk - Added parenthesis for logical "!= 0" comparison d0c95f8
@nikita-zhuk nikita-zhuk - Deprecation warning fix
- Removed extra 'GNU_RUNTIME' token
2c5b8e7
@nikita-zhuk nikita-zhuk - Added extra parenthesis for truth comparison e231d33
@nikita-zhuk nikita-zhuk - Make sure that correct encoding is used when defining default start…
… and end delimiters.

- This change also fixes compiler warnings.
6040c2b
@nikita-zhuk nikita-zhuk - Added -Wall flag to enable the most important warnings 028ac58
@nikita-zhuk nikita-zhuk - Replaced CFUUID with NSProcessInfo's globallyUniqueString, - Fixed …
…a memory leak & simplified the code
d2b6ff9
@nikita-zhuk nikita-zhuk - Fixed memory leaks in MiscMerge 4716a9c
@nikita-zhuk nikita-zhuk Added support for the following momc options:
MOMC_NO_WARNINGS, MOMC_NO_INVERSE_RELATIONSHIP_WARNINGS, MOMC_SUPPRESS_INVERSE_TRANSIENT_ERROR

These options can be set as ENV variables and they will be passed to the momc compiler.
96786d4
@nikita-zhuk nikita-zhuk - Fixed a bug which caused out-of-bounds index exception when code wa…
…s compiled as 64-bit
2cc83ab
@nikita-zhuk nikita-zhuk - Fixed a lot of NS(U)Integer issues which caused potential 64-bit in…
…compatibility
a4aa3b9
@nikita-zhuk nikita-zhuk - Removed extra semicolons
- Fixed one 64-bit safety issue
1f3a116
@nikita-zhuk nikita-zhuk - Initial PONSO commit eed19de
@nikita-zhuk nikita-zhuk - Added some Xcode4 user-specific stuff to .gitignore 0762a3e
@nikita-zhuk nikita-zhuk - Include DAG support classes in mogenerator itself 8c6804e
@nikita-zhuk nikita-zhuk - Removed xcuserstate 7515cf3
@nikita-zhuk nikita-zhuk - Ignore Xcode4 user-specific files 7104d99
@nikita-zhuk nikita-zhuk - Added the source for PONSO support classes 7d458b1
@nikita-zhuk nikita-zhuk - Return all properties in arrays sorted by property name.
- This guarantees stable ordering on subsequent mogenerator runs.
6145072
@nikita-zhuk nikita-zhuk - Moved generate.sh script 43579a2
@nikita-zhuk nikita-zhuk - Regenerated source files with mogenerator which maintains order 7f666c0
@nikita-zhuk nikita-zhuk - Fixed ponso's generate.sh script path feb6ce5
@nikita-zhuk nikita-zhuk - Removed old sources 1b5673c
@nikita-zhuk nikita-zhuk - New sample data model 2f85dc5
@nikita-zhuk nikita-zhuk - Ignore Xcode4 debugger metadata da7b182
@nikita-zhuk nikita-zhuk - Added a comment db71df4
@nikita-zhuk nikita-zhuk - Added compiled binary of mogenerator for convenience ca39de1
@nikita-zhuk nikita-zhuk - Added README about PONSO idea 7b22234
@nikita-zhuk nikita-zhuk - Added some details f2687bd
@nikita-zhuk nikita-zhuk - Removed userdata 1c8739b
@nikita-zhuk nikita-zhuk - Tweaked .gitignore file 63ed418
@rentzsch
Owner

Wow, lots of great work here. Thanks for digging into the old MiscMerge code and modernizing it. Also love the attribute sorting -- I've been wanting to do that myself. PONSO looks fantastic. My only gripe is that I don't think the mogenerator binary should be in version control. Tell you what, I'll accept the entire pull request and delete the binary (unless you can convince me I should leave it in?).

@rentzsch rentzsch merged commit b759975 into rentzsch:master
@nzhuk
Collaborator

Oh, sure. That was my fault, was easier during sample project dev but should've removed that before pushing ;)

@nzhuk
Collaborator

Test comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 4, 2011
  1. @nikita-zhuk

    - "Modernized" Xcode project a bit:

    nikita-zhuk committed
    - Updated Xcode project format to "3.2 compatible"
    - Set Debug architecture to "Native Architecture of Build Machine"
    - Set Release architecture to "Standard 32/64-bit Intel"
    - Set compiler to LLVM/Clang
  2. @nikita-zhuk

    - Fixed a compiler warning

    nikita-zhuk committed
  3. @nikita-zhuk

    - Specified explicit source file encoding - we assume it's UTF-8. Thi…

    nikita-zhuk committed
    …s fixes a lot of deprecation warnings
  4. @nikita-zhuk
  5. @nikita-zhuk
  6. @nikita-zhuk
  7. @nikita-zhuk

    - Deprecation warning fix

    nikita-zhuk committed
    - Removed extra 'GNU_RUNTIME' token
  8. @nikita-zhuk
  9. @nikita-zhuk

    - Make sure that correct encoding is used when defining default start…

    nikita-zhuk committed
    … and end delimiters.
    
    - This change also fixes compiler warnings.
  10. @nikita-zhuk
  11. @nikita-zhuk

    - Replaced CFUUID with NSProcessInfo's globallyUniqueString, - Fixed …

    nikita-zhuk committed
    …a memory leak & simplified the code
  12. @nikita-zhuk
  13. @nikita-zhuk

    Added support for the following momc options:

    nikita-zhuk committed
    MOMC_NO_WARNINGS, MOMC_NO_INVERSE_RELATIONSHIP_WARNINGS, MOMC_SUPPRESS_INVERSE_TRANSIENT_ERROR
    
    These options can be set as ENV variables and they will be passed to the momc compiler.
  14. @nikita-zhuk
  15. @nikita-zhuk
  16. @nikita-zhuk

    - Removed extra semicolons

    nikita-zhuk committed
    - Fixed one 64-bit safety issue
  17. @nikita-zhuk

    - Initial PONSO commit

    nikita-zhuk committed
  18. @nikita-zhuk
  19. @nikita-zhuk
  20. @nikita-zhuk

    - Removed xcuserstate

    nikita-zhuk committed
  21. @nikita-zhuk
  22. @nikita-zhuk
  23. @nikita-zhuk

    - Return all properties in arrays sorted by property name.

    nikita-zhuk committed
    - This guarantees stable ordering on subsequent mogenerator runs.
  24. @nikita-zhuk

    - Moved generate.sh script

    nikita-zhuk committed
  25. @nikita-zhuk
  26. @nikita-zhuk
  27. @nikita-zhuk

    - Removed old sources

    nikita-zhuk committed
  28. @nikita-zhuk

    - New sample data model

    nikita-zhuk committed
  29. @nikita-zhuk
  30. @nikita-zhuk

    - Added a comment

    nikita-zhuk committed
  31. @nikita-zhuk
  32. @nikita-zhuk
  33. @nikita-zhuk

    - Added some details

    nikita-zhuk committed
  34. @nikita-zhuk

    - Removed userdata

    nikita-zhuk committed
  35. @nikita-zhuk

    - Tweaked .gitignore file

    nikita-zhuk committed
Something went wrong with that request. Please try again.