SyndicodeSyndicode
Syndicode
Ruby on Rails, iOS, Android development agency
  • Home
  • Portfolio
  • Products
    • Marketplace
    • MVP
    • Web App
    • Website
    • Mobile App
    • Prototype
    • Enterprise App
    • Web Service
    • Backend
    • API Consumers
    • API Providers
  • Services
    • Dedicated professionals
    • Custom software development
    • Product Management
    • Project Management
  • Skills
    • Ruby on Rails
    • Android app development
    • iOS app development
    • UI/UX Design
  • Career
  • Blog
  • Video
  • Contact us
  • Language
Menu back  
FacebookLinkedinTwitterGithubBehanceTripAdvisorInstagram
 

ValueSemantics is a Ruby gem for making value classes

February 10, 2019blogBy Tonya Smyrnova
ValueSemantics is a Ruby gem for making value classes. Syndicode news

Recently we presented you 40 most used Ruby gems that can be very helpful for you. Before getting into the details of one of the gems, you might be wondering: what are value objects, and why would I want to use them? ValueSemantics is a Ruby gem for making value classes, so let’s explore it together.

ValueSemantics provides a way to make value classes, with a few additional features. These value classes are like immutable Structs, but they can be strict and explicit about what attributes they allow, and they come with a little bit of additional functionality.

The main design goals for this gem, in order of importance, are:

  1. Raise on developer mistakeIf any attributes are missing, that’s an exception. If there is a typo in the attribute name, that’s an exception. If you said the attribute should be a String but it wasn’t, that’s an exception. ValueSemantics can be used to make reliable guarantees about attributes.
  2. Be extensibleValueSemantics is primarily concerned with data types, and those vary from project to project. You should be able to define your own custom validators and coercers easily, and they should be as powerful as the built-in ones.
  3. Be unobtrusiveWhile ValueSemantics does have affordances that encourage you to use it as intended, it shouldn’t restrict your choices, or conflict with other code. Most features are optional.
  4. Follow conventions as much as possible, ValueSemantics should conform to existing Ruby standards.
  5. Be standalone, gem should be light-weight, with minimal (currently zero) dependencies.

Check out the documentation for all of the details.

And please investigate the way to create Ruby Gem with native extensions!

backendgemgemsobject-oriented programmingOOPrailsruby on railsRuby on Rails gemsRubyGemsRubyGems 3.0.0software developmentvalue classesValueSemanticsweb development
Share this post
FacebookTwitterLinkedInGoogle+
About the author

Tonya Smyrnova

Marketing manager and a tech writer at Syndicode who speaks more than four languages.

Related posts
Thinking like a programmer. Syndicode news
Thinking like a programmer
February 17, 2019
Google Play Store now open for PWA. Syndicode news
Google Play Store now open for PWA
February 17, 2019
Node_modules anyone?
February 16, 2019
Meet GoJS library for HTML diagrams! Syndicode news
Meet GoJS library for HTML diagrams!
February 16, 2019
Service-oriented architecture with Rails and Kafka. Syndicode news
Service-oriented architecture with Rails and Kafka
February 16, 2019
Agile Rock Conference 2019 by Scrum Ukraine. Syndicode events
Agile Rock Conference 2019 by Scrum Ukraine
February 15, 2019
HIRE SYNDICODE
Make your next project a smooth sailing with the help of Syndicode developers!

Submitclear

Search
Tags
Angular api backend blockchain business code css design elixir frontend functional programming github google html IT javascript js Kyiv markup Node Node.js Open source programming rails react react.js RoR ruby ruby on rails software development startup syndicode tech Technology testing typescript UI Ukraine UX UX design Vue vue.js Web App web design web development
Recent blog posts
  • Thinking like a programmer. Syndicode news
    Thinking like a programmer
    February 17, 2019
  • Google Play Store now open for PWA. Syndicode news
    Google Play Store now open for PWA
    February 17, 2019
  • Node_modules anyone?
    February 16, 2019
  • Meet GoJS library for HTML diagrams! Syndicode news
    Meet GoJS library for HTML diagrams!
    February 16, 2019
  • Service-oriented architecture with Rails and Kafka. Syndicode news
    Service-oriented architecture with Rails and Kafka
    February 16, 2019
Customer stories
UKRAVIT: CRM for agro business company. Syndicode Ruby on rails, iOS and Android development of e-concierge apps for hotels Bilakasa - Manage your cash registers online. Syndicode product Wecam mobile interface Senden24, instant delivery service, screen HelloCare marketplace android mobile app main cover image Box at Work. Ruby on rails website for ondemand storage and moving services startup NovaPoshta API Documentation Portal Woobra: selling page screenshot, Syndicode Clean Agents. Ruby on rails marketplace development for cleaning services in Germany Kinderlime - Web and mobile app to Empower your Childcare. Syndicode portfolio
Testimonials
  • We, at SalesValue, are very pleased to work with the Syndicode team! They are skilled professionals who can get the job done right on time. They have great people that are easy to work with and quickly understands the business needs. Syndicode is working on our Software as a Service solution for Sales Enablement, which includes advanced features like integration to Microsoft Graph, Google Drive, Salesforce and Dynamics CRM, as well as machine learning and algorithms. We can highly recommend them.

    ThomasThejn, CEO at SalesValue. Syndicode testimonials
    ThomasThejn, CEO at SalesValue
  • Syndicode has been a great development partner for us at Southern Made. They have helped us build a variety of websites and apps; everything from microsites that went from design to deployment in a matter of days to large-scale applications and APIs that were developed over many months. In addition to developing new web properties, they have been able to jump in and provide maintenance support on a wide variety of our existing apps with very quick ramp-up time. Syndicode works hard to make themselves available for constant communication and is a development partner I would highly recommend to anyone building web-based applications.

    Matt Mueller, Founder, Southern Made. Syndicode testimonials
    Matt Mueller, Founder, Southern Made
  • Syndicode team is awesome. It provides a channel to hire exceptional developers that share our DNA, vision and are full part in the team and company future. Appreciate a lot how highly knowledgeable everyone is about tech & business. A great environment to work and grow!

    Hotel Cloud – e-concierge mobile apps

    Hotel Cloud - e-concierge mobile apps. Syndicode
    DAVID-BENJAMIN BRAKHA, Founder & CEO
  • We are very happy with Syndicode’s highly skilled ruby on rails developers. They helped to optimize the VYDA backend massively. I can recommend them for highload complex projects.

    VYDA – video screencasts live sharing social network

    Markus Lichtenheldt, Founder & CEO
  • Inno-W Oy became first client of newly formed Syndicode agency since we have had long lasting cooperation with Syndicode’s CTO Anton Naumenko. They have provided ruby on rails and php development services in our various projects. Syndicode performs best as technology partner because they are experts in software engineering and very business oriented.

    Henry Palonen, CEO, Inno-W Oy
  • Syndicode helped during transition from MVP to beta release of SummitHub under tight schedule. Thanks to their expertise in continuous delivery process and instruments for Ruby on rails stack, we managed to pilot first conferences without any technical problems.

    SummitHub – professional knowledge network

    Jouni Renfors, Technical Lead, SummitHub
    Jouni Renfors, Technical Lead
  • © 2014 - 2019 Syndicode
  • Non-Disclosure Agreement
  • Privacy Policy
  • Syndicode Logos
  • Bilakasa
BottomMenu
FacebookLinkedinTwitterGithubBehanceTripAdvisorInstagram

We love our clients

We will beat any genuine quote by 5%

Contact us

no thanks, I do not want this opportunity

{"cookieName":"wBounce","isAggressive":false,"isSitewide":true,"hesitation":"","openAnimation":false,"exitAnimation":false,"timer":"","sensitivity":"","cookieExpire":"","cookieDomain":"","autoFire":"","isAnalyticsEnabled":true}