33 Matching Annotations
  1. Jul 2015
    1. UML (Unified Modeling Language) is so general-purpose modeling language that could be used to express any kinds of software-intensive systems. In this reason, using UML for a specific domain or platform is not sufficient, so you may need to define UML Profile.
    2. A model element typically may have multiple corresponding view elements. Model element have its own data such as name, stereotype, type, etc. View element just renders the corresponding model element in a diagram. View elements may exists multiple times in a diagram or different diagrams.
    3. Many users are confusing the difference between diagramming or drawing tool such as Microsoft Visio and modeling tools such StarUML or Rational Software Architect. First you need to understand a diagram is not a model.
    1. This behaves in almost the same way as outlined previously, with a couple of small exceptions. First, the prefix used to name the input elements within the form (hence the key that denotes them in the params hash) is actually derived from the object's class, e.g. params[:post] if the object's class is Post. However, this can be overwritten using the :as option, e.g. -

      <%= form_for(@person, as: :client) do |f| %> is not working

      <%= form_for @person, as: :client do |f| %> is right syntax.

    2. For fields generated in this way using the FormBuilder, if :person also happens to be the name of an instance variable @person, the default value of the field shown when the form is initially displayed (e.g. in the situation where you are editing an existing record) will be the value of the corresponding attribute of @person.
    3. The variable f yielded to the block is a FormBuilder object that incorporates the knowledge about the model object represented by :person passed to form_for. Methods defined on the FormBuilder are used to generate fields bound to this model. Thus, for example,
    1. This is useful for objects that are not yet ready to be persisted, such as a Signup object constructed in a multi-paged process, or objects that don't change much and are needed all the time, such as a User object for a system that requires login.

      objects that are ready to be persisted 한 것들은, server에 지속적으로 저장되는 객체들로 생각할 수 있다. 반면 session에 저장되는 obejct들은 브라우저가 켜져 있는 동안만 저장되는 것들이다.