Quantcast
Channel: Astah in 5min
Viewing all 152 articles
Browse latest View live

Setting delegate property to a Class

$
0
0

In Astah Professional, Java, C++ and C#’s specific language setting is available.
Here’s an example of setting delegate to a Class.

(1) Select a project package in the structure tree
(2) Go to the pane below the tree view and select [Project Setting] tab
(3) Check in the [C#] checkbox
Language_Setting1

(4) Now select a Class in a diagram and then select [Language] tab in the left bottom pane, then check [C#] – delegate
Language_Setting2

Thanks,
SJ



Hide all the Attributes and Operations from diagrams

$
0
0

In Astah, all the attributes and operations appear as you add them on diagrams. But depending on the scenes, you may want to hide them. There are three ways to do so.


bluebar1. Per models

If you want to hide them for particular Classes, right-click on the model and check [Attribute Compartment Visibility/Operation Compartment Visibility]

Compartment

 

bluebar2. To all the models on existing diagrams

Select a diagram you want to change the visibility setting of and then go to the left bottom pane, select [Initial Visibility], then check off [Attribute Compartment Visibility] / [Operation Compartment Visibility] then click [Apply to existing elements]

Property

bluebar3. Make it as default setting

If you want to show no Attributes/Operations at all on the diagrams by default you can do so by going to [Tool] – [System Properties] – [Initial Visibility1] and take the check off from [Attribute Compartment]/[Operation Compartment]. This setting applies to new diagrams.

SystemProperties

Thanks,
SJ


C# Reverse Plug-in updated!

$
0
0

We have updated C# Reverse Plug-in with a bug-fix.
Update to the latest version from here.

If you are using Astah Community version but want to try out how C# reverse works, you can get a free trial license of Astah Professional (for 50 days) from here.


Renumbering Goals and Contexts…etc in GSN

$
0
0

With Astah Script Plug-in, you can renumber the Goals and Contexts on the GSN.

(1) Download the script from here.

(2) Unzip the downloaded file and save this resetGSN-ID.js file.

(3) Launch Astah GSN and go to [Tool] – [Script]. (To add this menu, you need to install Script plug-in first.)
Astah_Script_Open_Window

(4) A [Script] window opens. Select [Script] – [Open], and select the .js file you downloaded at step (2) .
Astah_Script_Window2

(5) Script appears in the window above, click [Action] – [Run] or click the [Play] button in red box below.
Astah_Script_Plugin3

(6) When it completes, it shows the “Finished!” and a result of how Astah changes the ID in the bottom pane and the numbers are updated at the same time on GSN.
Astah_Script_Plugin4


smarter2 Other script you can use in Astah GSN


Auto-layout of GSN

$
0
0

With Astah Script Plug-in, you can automatically lay out the GSN nicely. This feature is very useful at the finish-up.

(1) Download the script from here.

(2) Unzip the downloaded file and save this layoutGSN.js file.

(3) Launch Astah GSN and go to [Tool] – [Script]. (To add this menu, you need to install Script plug-in first.)
Astah_Script_Open_Window

(4) A [Script] window opens. Select [Script] – [Open], and select the .js file you downloaded at step (2) .
Astah_Script_Window2

(5) Script appears in the window above, click [Action] – [Run] or click the [Play] button in red box below.
Astah_Script_Plugin3

(6) Then GSN should automatically be shaped nicely!


smarter2 Other script you can use in Astah GSN


Add extensions to Astah GSN with Script Plug-in

$
0
0

Have you ever thought… “I wish Astah could automatically lay out the goals, strategies nicely” or “renumber the goals and contexts ID automatically..”? You could do both by adding this “Astah Script” plugin.

smarter2   What is Astah Script Plug-in?

Astah script Plugin

Astah Script Plugin

Astah Script Plug-in is an extension of Astah which enables you to access Astah via JavaScript or other scripting languages. This Plug-in is officially supported to other editions of Astah (Astah Professional and Astah SysML) but there is a way to get a benefit of this plugin for Astah GSN users too!

 

 

 

smarter2   How to install Script Plug-in to Astah GSN

(1) Download Astah Script Plug-in from this page.

Astah_Script_Plug_in_download

 

 

 

 

 

 

 

(2) Unzip this “astah_script_plugin-x.x.x.zip” file. You will find “script-x.x.x.jar” folder in the “plugins” file.
Save this .jar file in the directory below: Userhome ▸ .astah ▸ gsn ▸ plugins

If the [Script] menu appears under [Tool], that means you installed successfully! Now you can perform some features using the sample scripts listed below.

Astah_GSN_ScriptPlug-in1

 

 

 


smarter2   Sample scripts for Astah GSN



3 TIPS to create UML Class Diagrams fast

$
0
0

With only these 3 TIPS, you can speed up your time on creating UML Class diagrams.

Astah_draw_diagrams_quick


smarter2 TIP 1: Double-click to create Classes

In Astah, you can create the most frequently used model in the diagram just by double-clicking. (Classes in Class diagram, UseCases in UseCase diagram, States in Statemachine diagram..etc)

 

smarter2 TIP 2: One-click to create Models using Mini-icons

DrawSuggest_Astah_UML

Set of Mini-icons of Class

Astah has mini-icon set called “Suggest Feature“.
When you have a mouse over a model, this mini-icon set appears which is a list of models that you can add to this model.
So only one-click of this mini-icon creates the model. So you don’t need to go back and forth between the tool palette to choose a model to create and then diagram editor to add it.

 

smarter2 TIP 3: Use Shortcut keys

Use shortcut keys to add properties, for example [Ctrl/Command+R] to add Attributes and [Ctrl/Command +M] to add Operations.

Shortcut keys help your hands stay on the keyboard, so more instant to create a model and enter its name. Also hitting [Enter] key can add another model which was previously made, this also helps to add models in a row very quickly. Here’s a whole list of Astah’s shortcut key list. You can also customize these bindings to your preference.

Thanks,
SJ


Representing Customized icon on diagram

$
0
0

With Astah, you can add images which are associated with models stereotype. For example, when you want to show Database icon on UseCase diagram, this is how you do so.

(1) Have an image file to represent a database ready.
(2) Open .asta file, select a root package in the tree structure, and then go to [Profile Stereotype] tab in the pane below. Click [Add] button.
Astah_Customized_Icon

 

 

 

 

 

 

 

 

 

 

 

 

(3) A stereotype will be added, click [Edit] button
Astah_Customized_Icon_UML2

 

 

 

 

 

 

(4) Another dialog appears. In the stereotype field, enter a stereotype in it and then click [Icon] button and specify the image file you want to associate with model which has this stereotype. In this example, I type “database” and upload an image of database.
Astah_Customized_Icon_UML3

 

 

 

 

 

 

 

(5) Create a model and add a stereotype, database
Astah_Customized_Icon_UML5

 

 

 

(6) At last, right-click on the model in a diagram and select [Icon Notation] – [Customized Icon] from its Pop-up menu.
Astah_Customized_Icon_UML7

 

 

 

 

 

 

 

 

 

 

Then the model will turn into the image uploaded!

database_icon_astah

 

 

 

 

 

 

 

 

Give it a try!

Cheers,
SJ



[Important] Website maintenance on Apr.15

$
0
0

We will be running our maintenance on Change Vision Members site on April.15(Wed) 5:00am – 9:00pm EDT.

Astah_CV_Members_Site

Change Vision Members Site

During this time period, you aren’t able to:
– sign up with Change Vision Members service
– register purchased licenses including license renewal
– use product support form
– extend trial licenses
– issue license file
– download older version of Astah (Download of the latest version is available on Astah.net)

We apologize for the inconvenience.

If you are planning to purchase Astah around this time from our online store, make a purchase ahead of time.

Thank you very much for your understanding.

Astah Team


Customize your default file to start modeling with

$
0
0

In Astah with a default setting, when you create a project by [File] – [New], this default file opens with a [Java] package with all the models under.

A default file that opens from [File] - [New]

A default file that opens from [File] – [New]

You can customize this file by adding models that you frequently use or removing that you never use. You can make this default file the most effective one that you start with on your own.

For example, if you want to use Perls Data types in Class diagrams such as scalar, array, hash..etc, you can add these Data Types into the project you start with.


smarter2 Instruction


(1) Create a new file with all the models you want in a file that opens from [File] – [New].
I’ve made a model like this with Perl Data Types this time.

Perl Data Types

Perl Data Types


 

 

 

 

 

(2) Save this file (i.e. “perl_template.asta”) in Userhome/.astah/professional/template/project
(3) Launch Astah and go to [Tool] – [System Properties] – [Project] and change the followings:

    – Create New Project with : User Template
    – Template File name : Enter file name (i.e. “perl_template.asta”)

Astah_SystemPropeties

 

(4) Now this customize file opens when you create a new file

These added Data Type now automatically appear in candidates list without adding them each time you need them.
Astah_Perl_data_Type


Development Tools Astah Team uses

$
0
0

(Enlarge the image)

This is a blog post of Hiroki (@kompiro) from Astah dev team.


At Java Day Tokyo 2015 held here in Japan a few weeks ago, Kenji introduced how we develop Astah and what kind of tools we use, there was a nice amount of interest, so I’ve decided to post it here on this Blog.

Kanban in Astah Team Showing Idobata Kenji doing LT at Java Day Tokyo 2015 A photo of Kanban in Astah Team

Main tools that Astah team uses

  • Idobata: Chat app for sharing status of tasks within team
  • Trac: Wiki & Ticket management
  • GitHub: For Source Code Management and also for code review
  • Jenkins: For CI and building installers
  • VMWare ESXi: For multiple-virtual machine runs
  • Trello: As a daily online-Kanban board to show the project status and also used in retrospective meeting
  • Hubot: ChatOps – very hard-working guy in our team to move our project smoothly!
  • Raspberry Pi: For taking a picture of the kanban board in the office with camera – shots at 10 every morning
  • Google Apps: For storing those photos in Google Drive. Seeing those 5-day of Kanban board photos helps us find where tasks tend to be piled up.
  • Status Management – Susumu: Github issue-management tool which we developed as Chrome extension.
  • Kanban: For visualizing the project – sharing tasks of dev team and also support team

Tool Introduction – how we use them

 

Idobata

https://idobata.io/

Idobata is a chat app developed by our parent company, Eiwa System management but that is not why we are using it. This tool is just simple to use. Slack is another popular chat app. Slack has many features and can easily integrate with various tools almost without doing nothing. But I love customizing a set of tools to collaborate each other to make them the most effective way for each project, so I tend to like tools with less features and more potentials for customization. That is exactly what Idobata is.

Trac

http://trac.edgewall.org/

I see JIRA and Redmine are getting popular. Trac does not have many features but is very easy to customize just like they say – “Trac is a minimalistic approach to web-based management of software projects.” I am a long time user of Trac myself and creating plugins to let it integrate with other tools such as one that passes information from Trac to Idobata.
We don’t manage tickets on GitHub as we find that it is not easy to view all the issues of project on it.

GitHub

http://github.com/

Yes, we all know the GitHub – what I like about Git is that it supports the workflow with pull request, and is very useful for a code review, but it also works good as a repository browser. After we make pull requests, we use labels to manage the review status. I plan to write more about the flow we use with Github in other posts.

Jenkins

https://jenkins-ci.org/

After pushing in GitHub, Jenkins automatically does CI but also builds installers for each OS using 4 buildslaves. It needs only one button to build installers and also we use Jenkins to deploy them on each server.

Lately I often see the usage of Jenkins with Hubot to process jobs. But in our team, we have too many jobs to get an advantage of the usage yet.. so there is a room for an improvement with Jenkins in our team.

VMWare ESXi

https://www.vmware.com/products/esxi-and-esx/overview

As you know, Astah works on multi-platforms (Windows, Mac and Linux). There are more light-weight virtual environment we can easily try on such as Vagrant and Docker but we are using this server due to our resource and also some of our team member want to share the same machine environments.

Hubot

https://hubot.github.com/

This is a very hard working hobbit in our team – executing the commands that are thrown on Idobata based on all the other information which was also thrown on Idobata from other services. For example, when this hobbit sees a label on the pull request on GitHub, he moves the card on Trello to the right status accordingly. Yes, that’s what we call ChatOps – and in my future posts, I will show the Hubot scripts that we are using.

Raspberry Pi

https://www.raspberrypi.org/

Astah team has been using Kanban to visualize the project status. One of the most powerful advantages we can get with Kanban is how effectively we can see where and in what status the tasks are piled and then we will know where the bottleneck is, then by removing it we can increase the throughput overall. And this is what we do. We take a picture of Kanban board at the same time (10am) every morning and review those photos at our retrospective meeting on every Friday evening. Seeing the Kanban photos of 5 days promotes the discussion for ideas to improve the spot where projects or tasks would get stuck. We are using Raspberry Pi for the automated snap of this Kanban board. And of course we can take the photo anytime manually just by typing the command bot shot on Idobata.

we are very lucky to live in this era where it is easy to make such system with reasonable cost.

Google Apps

https://www.google.com/work/apps/business/

We use Google Apps to use Gmail and Google Drive to share all the internal documents and also to store these Kanban photos automatically.

Status Management Susumu-kun

https://github.com/ChangeVision/susumu-kun-nx

When a pull request is made on GitHub, we move to check and accept that the modification is made correctly as we planned. And this Status Management Susumu-kun comes handy in this flow. (Susumu-kun is a male name in Japanese which means “progress”. This is a simple utility to change the status of each task, but makes the workflow very smoothly. This was an idea from Yuri.

Kanban

At last, Kanban. We use Kanban not only for visualizing the development status, we also use it for visualizing all the bug reports and feature requests we receive from or customers daily. Every morning we have a morning stand-up meeting with dev team and support staff in front of this Kanban board and share each members tasks of the day and also share voices that support team receive from customers directly to dev team members to discuss the best solutions for each customer.


How we collaborate these tools

The top image shows all the relations among all the tools I introduced here, and here are the images of tools cut by scenes/purposes.

CI and Installer building by Jenkins

Jenkins_astah
When someone pushes on GitHub, Jenkins does CI and shows its result on Idobata. Jenkins and other tools are ran by ESXi.


Status Visualization

VisualizationWe manage the whole project in Trac, push to each repository and then tickets will be automatically closed in Trac when PullRequest is merged. Kanban visualizes the whole view of the team and project status, requests from customers for both dev team and support team.

Any changes from GitHub and Trac are notified on Idobata on real-time and Hobot monitors every change on Idobata and then automatically makes updates on Trell accordingly.


Automated-snap of Kanban by Hubot

Hubot_astah
The Hubot runs on Raspberry Pi. RasPi takes a shot of Kanban board at 10:00 every morning and uploads the photo onto Google Apps automatically.

That’s all for today – will write more details for each tool and process in the future posts – thank you for reading!

PS: All the images are made by Astah using customized icons related to stereotypes.
Astah


How to create Interfaces in rectangle shape

$
0
0

When you create Interfaces in UML diagrams with Astah, you can choose one from 4 types directly from the tool bar.

However when you drag and drop the Interface on diagram from structure tree, it automatically shows in circle.
Astah_interfece_circle

To change this to rectangle shape, you need to do so from pop-up menu or top tool bar menu.

Select [Icon Notation] on Pop-up menu Click [Normal Icon] on the top menu

 
If you want the Interfaces in rectangle shape always, here is a trick to do so.

(1) Open “JudeP.properties” with text editor. You can find it in Userhome\.astah\professional

(2) Add this option below and save the file.

basic.interface_shown_as_rectangle=true

Astah_System Properties

(3) Restart Astah

Then now all the interfaces you drag & drop from structure tree will be represented in rectangle shape!

Cheers,
SJ


Eclipse like [Task View] is now available in Astah

$
0
0

You can add Eclipse like [Task View] to Astah!
Big thanks to Shi-n, a member of Friends of Astah who developed a plug-in to made it possible!
Now you can add reminder notes, “to-do”s to specific models as you model and show them in a list.


smarter2 How to add Tasks to [Task View]

(1) Download this plug-in file

(2) Start Astah and go to [Help] – [Plugin List] – [Install] and select the plug-in file you downloaded at (1)

(3) Restart Astah, if you see [Task] view below the diagram editor, the installation completed successfully.

Eclipse Astah Task View

Installation completed if [Task] View is added below Diagram Editor.

(4) Create a Note on diagram

(5) In the Note, type your comment with [TODO] at the beginning

(6) The comment will be added in the [Task] view

Astah Task View List

Double-clicking the item in the list will open the diagram too.


smarter2 Create your own Plug-ins!

If you are interested in creating plug-ins for Astah, here’s the information you need!
Developing Astah Plug-ins
Astah Plug-in Development Tutorial

Cheers!
SJ


Development Tools Astah Team uses – More about Hubot

$
0
0

Hello again, this is Hiroki (@kompiro) from Astah development team. In my last post, I introduced several tools that we use to develop Astah.

How we use Jenkins, Trello, Raspberry Pi, etc. to build our Product, Astah

Do you use Hubot in your team? Hubot is an excellent robot which can automatically help solving impediments and moving tasks along automatically in the project. For instance, by using Hubot in the chat room, he will carry on the following tasks:

  • Reminds us when it’s time for a daily standup or retrospective meeting
  • Asks Jenkins for building and uploading new builds (ChatOps)
  • Gives us a link of ticket if any ticket number is mentioned on the chat
  • Update the ticket status of GitHub to Trello…etc.

Didn’t get the last one, Update the ticket status of GitHub to Trello..? This is one of the usages of Hubot in our team.
Do you want to know how Hubot can be a hub of each service, work between them to run your projects effectively?

robot#respond() & robot#hear()

There are two commands to ask Hubot for run. One is "robot#respond()" and another is "robot#hear()".

"robot#respond()" is something you set the command in advance and by calling Hubot like below, Hubot will make an action accordingly.

Hubot> hubot ping
PONG

In this sample code, Hubot receives the "ping" command and returns "PONG".

Another is "robot#hear()" which lets Hubot monitor all the messages on the chat and makes actions when he catches certain messages.

There was something that bugged me often which is when people talk about issues just with the ticket number – which leaves the rest of the team who are not familiar with the ticket not knowing what they are talking about. At least I did not want to make that happen on the chat. So this is what I did with Hubot.

Idobata_hubot_astah

idobata – the chat service we use

On chat, Kamura told Yuri that her fix of #6257 was good. Right after that, Hubot mentions the URL of the ticket and the summary of it (the title of ticket) so that others can know which issue they are talking about without trying to find them by themselves. The Hubot’s action is made by the command below.

robot.hear /trac \#(\d+)(?=[^\w]|$)/ig, fetchTicket

First parameter is the regular expression of the condition of the monitoring, the second is the function that implements the operation. (Here’s the code if you are interested.)

Service integration by using robot.hear

Hubot monitors every single message posted on chat. So I thought that I can let Hubot make actions automatically based on the messages that are coming from other service. For example, when a Pull request is made on GitHub, a message appears on the chat automatically. So what I wanted was to update the review status of the pull-requested-ticket onto the cards on Trello (the Kanban board we used in our project) when Hubot sees the message on chat. This is the Sequence diagram of my idea.

Update changes from GitHub to Trello

To be strict, the messages between Idobata and Hubot are more complicated, but this is just a rough one for now. (The flow between GitHub and Idobata can be made by Webhook in each repository or Organization level too.)

The idobata outputs the message below in the chat room when it receives a change of ticket label from Github.

Idobata

which consists of below:

"Username" labeled "label name" to "target PR(Pull Request) info" "issue title"

When we make a pull request on Github, we always put ticket number in its title like “#6131 xxxxx (title)”. (Ticket number I say here is Trac’s ticket number. We use several repositories for developing Astah and we manage all the entire backlogs in Trac.)

So in this example, “refs #6131” is the ticket number and Hubot can get Github issue number by using regular expression. This is very simplified, but this regular expression, /.*\s+labeled (\w+).*#(\d+).*/i can match Target Pull Request info for the 1st and ticket number for the 2nd. When we create Trello cards, we always put ticket number and ticket’s title, so that Hubot can identify related Trello card by ticket number and move the card to the “labeled” status on the Trello automatically.

Trello_Sample_image

Here’s the sample code:

  robot.hear /.*\s+labeled (\w+).*#(\d+).*/i,(msg)->
    label = msg.match[1]
    ticket_id = msg.match[2]
    trello.get_board target_board_name,(err,board)->
      if err
        throw err
      trello.get_list board, label.capitalize(), (err,list)->
        if err
          throw err
        trello.get_cards_on_board board, (err,cards)->
          for card in cards
            re = /#(\d+).*/i
            match = card.name.match(re)
            if match
              card_id = match[1]
              if card_id == ticket_id
                 trello.move_card card, list, (err)->
                   if err
                     throw err

Java is my main language so I don’t really know how to write clean coffeescript. (Should I use Promise instead of using callbacks….?)

So this was an introduction how we use Hubot as a hub of each service and run between them automatically. In my next blog, I will write about the development process of Astah!

– Hiroki


How to run your script on Astah version – on Java 8

$
0
0

The Script Plug-in is the easiest way to add customized features to Astah for your specific needs using API.
Astah moved its Java Runtime from Java7 to Java8 since version 7.0 and due to its update, the script you were using in Astah 6.9 or earlier will no longer function in version 7.0 or later. You need a small tweak to make it run.

How to update your existing Script

1. importPackage

Use one of the following notations ;

Before

importPackage(com.change_vision.jude.api.inf.editor);
//use the classes in the package

(A) Use JavaImporter

with(new JavaImporter(com.change_vision.jude.api.inf.editor)) {
    //use the classes in the package
}

(B) Load “nashorn:mozilla_compat.js”

load("nashorn:mozilla_compat.js");
importPackage(com.change_vision.jude.api.inf.editor);
//use the classes in the package

(C) Use Java.type

var TransactionManager = Java.type("com.change_vision.jude.api.inf.editor.TransactionManager");
//use the class

2. println

Before

println("Astah"); 

(A) Use print instead of println

print("Astah");

(B) Add println=print;

println=print;
println("Astah");

3. .class

Before

var classes = astah.findElements(IClass);

Add .class


var classes = astah.findElements(IClass.class);

Reference

Please refer to the following website for more details.
https://wiki.openjdk.java.net/display/Nashorn/Rhino+Migration+Guide

Cheers,
SJ



Astah Professional/Community 7.0 Released!

$
0
0

We are happy to announce that we just released Astah Professional and Community version 7.0!
Version 7.0 has new icons, simplified Main menu, Retina and High-res display support, Java8 support and more! Watch this quick one-min video to learn what’s new in version 7.0 and update yours now!


smarter2 What’s New & Download 7.0

What’s new in Astah 7.0: http://astah.net/release-notes/7.0-features
Download Astah 7.0: http://astah.net/download

Since this version, Astah Community is no longer available for commercial use. Please read the detail here.
Important Announcement about Astah Community

Thanks,
Astah Dev Team


Change color of models based on its status/conditions

$
0
0

When you do the database design with Entity Relationship Diagrams (ERD) with Astah Professional, you may wish you could distinguish Entities (Tables) per database easily on the diagram. Since Astah currently does not handle multiple schemas per project, we are recommending these two ways.

(1) Change Entity colours based on Entity Type

[Tool] – [System Properties] – [Default ER Entity Type Color] can configure the color based on Entity Type base. (Up to 9 Types)

ER_Entity_color

 

(2) Use a script to change Entity color based on its condition

Enter database information for each Entity in it’s definition field, then run the script to change Entity colors based on the information.

  1. Open ER Diagram and enter [a] in its definition field. In this sample, the left Entity has [a].
  2. Astah_ERD_1

  3. Download and install Script Plug-in
  4. Download script (Unzip after download)
    – If you are using Astah Professional version 6.9 or earlier, download this instead

  5. Go to [Tool] – [Script]. A [Script] window opens
    Astah_ERD_Script_plugin
  6.  

  7. Go to [Script] – [Open] and select the .js file you downloaded
    astah_ERD_script_window
  8.  

  9. Now go to [Action] – [Run] or click the arrow button in red circle.
    astah_script_plugin_erd
  10.  

  11. Now the ER Entity which has [a] in the definition field will change its color to blue
    astah、ER Diagram, Script, Plug-in

■ Customize this script to apply to other models

You can customize this script to apply to other diagrams and models by customizing the keywords and conditions.
Astah API
Astah Java Doc


[Important] Website downtime announcement – Sep.25 – 27

$
0
0

Due to database maintenance, the Change Vision Members site will be shut down during: Sep.25(Fri) 6:00am – Sep.27(Sun) 8:00pm in EDT.

During downtime, you will not be able to:
– Sign up a new account
– Register your license
– Manage (renew/reissue) your license and
– Download older versions of Astah

We apologize for the inconvenience it may cause and thank you for your understanding.


Git Data Model

$
0
0

There are many ways to use the Git, but there are only 8 simple core models that consist of Git’s foundation. Without understanding this model, you may not be able to use the Git as you are supposed to. I hear “Git is not easy, but in my opinion, those people are not understanding Git’s model. It is actually very simple, so I will explain the core models that consist of Git and relations between objects related to Git’s basic commands.

Git Basic Concepts

You can take apart the basic concepts of Git into these two:

  • GitObject
  • Reference

GitObject is the object Git manages. Commit is the GitObject. Files stored under the objects that appears in the .git which is the Git repository, is the GitObject. GitObject is shown with the first 2 characters as subdirectory and the remaining character as filename based on the hashed strings of its contents.

Reference refers to Commit. Branch is the Reference. When you open the .git which is the Git repository, the files stored under refs are the Reference. Reference contents is Commit ID.

This is the model of these basic core concepts and relations between them.

Git data model around Commit with Astah

  • Commit – this is a concept to show the commit graph. Commit contents include not only the comment but also former Commit, Trees that show the structure of file directories, User, which is the committer and author, date committed and file timestamp. When you execute rebase or cherry-pick, commit --amend, it changes Commit ID because it changes the former commit and its file timestamp.
  • User – This is a concept to show the commit-related person. It shows in user icon in GitHub. User’s email is used.
  • Tree – This is a concept to show the tree. Tree has Tree that shows subdirectory and Blob that shows files. There is a name to refer to both the Tree and Blob.
  • Blob – This is a concept to show files. All the files in the working tree is copied. .git stores all the files that have been changed.
    Because Blob objects are the files, the size of .git/objects tends to become large. To prevent it becoming too large, it compresses the contents and also uses hash on filename for the same contents without making a new separate file.
  • Branch – branch itself, can be branch of the local repository and the remote repository. Reference under .git/refs/heads is the branch of local one and Reference under .git/refs/remotes is the remote’s. The refs specified in .git/HEAD is the the branch you are currently on. When you run the commit while you are checking out the branch, it follows the commit, but it is just only updating the contents of the branch pointed by .git/HEAD.
  • Tag – This is the Reference under .git/refs/tags.

Git has so many features to offer, but these are the only core models and objects based on these concepts are working together.

Astah_Git2

Git really gives meaning to each object by its filenames and directories. I made models about 4 frequently-used commands in Git, clone, fetch, push and pull.

clone

Astah Git Clone

When you run the command clone, it gets GitObject and Reference from the specified remote repository and creates master branch in the local branch.

fetch

Git Fetch

When you run the command fetch, it gets GitObject and Reference from specified remote repository. It only updates the remote branch in the local repository. The local branch itself will not be updated.

push

Git Push

When you run the command push, it sends GitObject and Reference to the specified remote repository. If it is not the fast forward push with remote repository’s branch and local, it returns an error. push -f will skip the check if it is the fast forward or not. When you specify the branch, it pushes it and also GitObject that is related to the branch.

pull

Git Pull

When you run the command pull, it gets GitObject and Reference from specified remote repository and then merges the remote branch to the local.

Repository Setup

Repository setting is configured in the .git/config. When you open it, it should show as below.


[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
        ignorecase = true
        precomposeunicode = false
[remote "origin"]
        url = git@github.com:ChangeVision/astah.git
        fetch = +refs/heads/*:refs/remotes/origin/*
[ branch "master" ]
        remote = origin
        merge = refs/heads/master

In this sample, it is defined as below:

Setting up repository

You can find it around [core]. You can see this is created as non-bare repository from bare = false.

Name and URL of remote repository

You can find it around [remote "origin"]. URL of the remote repository named origin is git@github.com:ChangeVision/astah.git and fetch target is +refs/heads/*:refs/remotes/origin/*.

Upstream tracking branch between local and remote branch

You can find it around [ branch "master"]. Upstream of master branch is set as origin‘s refs/heads/master.

So this was my brief explanation about Git’s core concepts. Hope you find that Git is actually simple.
I believe modeling helps to visualize and understand the relations of concepts in the system that are hard to find clearly just by reading the documents.

How about you try modeling the concepts of any tools you are using? It will help you understand the system deeper and find the better way to make a use of the system!

Reference

GitBook

I used Astah to create these diagrams.
If you want to view diagrams and directly edit, you can download the file from here and open it using Astah (Free version Astah Community or 50-day free trial of Astah Professional edition).


How to add ER Data Type

$
0
0

When you set Data Type to ER Entity’s attributes in Astah, you can choose it from the [Data Type] list in the [Base] tab of Attribute’s property view.

 
add_er_data2

 

 

 

 

 

 

 

If you cannot find the one you want, you can always add from [ER Data Type] menu. Here is an example of adding one – [VARCHAR2].


■ Step

  1. Launch Astah and go to [Tool] – [ER Diagram] – [Set ER Data Type]
  2.  
    add_er_data3

     

     

     

     

     

  3. Click [Add] on the [Set ER Diagram Data Type] dialog
  4.  
    add_er_data4

     

  5. Enter [VARCHAR2] for Data Type Name and the click [OK]. You can set property for the length and precision of data too.
  6.  
    add_er_data5

     

     

     

     

     

     

  7. That’s it. Now [VARCHAR2] is in the list!
  8.  

    er_add_data1

 


Free Plug-ins you can use for ER diagrams in Astah


Viewing all 152 articles
Browse latest View live