Git Product home page Git Product logo

parse-uml's Introduction

Parse to UML

This is a very basic script based on the Parse PHP-SDK. The goal is to generate automatically a class diagram from your Parse objects. You can choose which objects to include in the diagram.

The code is pretty straight forward but I'll explain how it works.

How to install

First you need these things:

  • Have a Parse App (You'll need the AppID, REST-key and the MasterKey).
  • Install the PHP-SDK (using composer or download the files).
  • Get the files from this repo.
  • Change the name of config-sample.php to config.php and copy-paste the keys of your app.
  • Read the code from line 24 to line 44 and change the objects in the example according to the ones you want to generate the UML for.
  • Run index.php a file called uml-xx-xx-xxx_xxxx.txt should download.
  • ???
  • Profit !

Cool but now I have a .txt file, this isn't UML !

How to open the .TXT file

The file you'll download is written for PlantUML which is a really cool and simple way to write UML. It can take text files and generate diagrams, the images can be generated in PNG, in SVG or LaTeX format.

You need to download PlantUML.

Because we're interested in a Class Diagram, PlantUML requires Graphviz to render the diagrams.

Because Graphviz's server is running on boiled potatoes, you might not be able to download it directly from their servers. I have uploaded for you the latest Windows installer.

If you're paranoid or something, you can check the md5.

  • Now that we have the .txt an PlantUML running you just open it, and select the directory were you put the downloaded file.

Then, ... magic!

@startuml   
class _Date { 
 date 
 timezone_type 
 timezone 
 }
class User { 
objectId
_Date createdAt
_Date updatedAt
blabla
email
username
} 
class Temperature { 
objectId
_Date createdAt
_Date updatedAt
tmp
available
    }
@enduml

The file above outputs this diagram: Generated UML

###TODO

  • Relation mapping.
  • XMI UML generation. (StarUML/VisualParagidm/...)
  • Take over the world.

parse-uml's People

Stargazers

 avatar Nam Nguyen avatar Chokri avatar

Watchers

Raed avatar

Forkers

jessianngeorge

parse-uml's Issues

/schemas API

I just found out that Parse has a /schemas endpoint 0, While it was instructive trying to work around private members of ParseObjects and jumping over loops to get the data, this seems much cleaner and I should release a 1.0 (perhaps switch from the PHP-SDK to the JS)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.