Micheal  Block

Micheal Block

1597748400

Can Design Save the World?

Each time we are faced with the compelling question ‘What kind of world are we leaving for our children?’ it leads to a discussion on physical factors such as plastic-free packaging or organic fabrics that help reduce carbon footprint. But as members of the technological revolution, have we stopped to ask if we are designing responsible experiences for the future? If history is any indication, humans are highly adaptable creatures. Simple behavioral traits at a particular point in time can have far-reaching effects on human evolution. So, truth be told, designing the right experiences that inculcate desirable habits definitely deserves more attention than it presently receives.

But what is a responsible experience? Well, to understand that, let’s first discuss some not-so responsible experiences. Have you ever scrolled through your Facebook wall for a couple of minutes just before going to bed, only to realize that those few minutes have transformed into an hour or even longer? Have you ever said ‘This episode’s going to be my last’, but then ended up binge-watching an entire season on Netflix? Don’t worry, we’ve all been there! So, what are these apps goading you into doing? Basically, they act as bottomless pits of information, shamelessly pushing more and more content your way, till you are forced to stop. In simple words, they’re hijacking your brain. Another excellent example of this is to notice the number of times that you look at your phone to know the time. Do you ever just glance and stop? Or do you lift your phone, open up some apps and spend another 5–10 minutes scrolling aimlessly, completely oblivious to the fact that all you truly wanted to do was check the time?

Research conducted by British psychologists shows that young adults check their smartphones roughly twice as much as they estimate that they do. We are a society of pending notifications and blue ticks that are screaming at us, waiting to be noticed. To add insult to injury, we’ve been trained to respond to these signs as if they were natural parts of our existence. This is what illustrates an experience that makes poor use of our time, distracts us from our intended action and leaves us feeling unproductive. Responsible design, on the other hand, effortlessly enriches our daily actions, ultimately improving our everyday behaviour.

Google Pixel’s ‘always on’ display is a perfect example of this phenomenon. The designers at Google developed a screen that always displays the time and date, even when the screen is unused. This is a silent indication to the user that he needn’t even move to perform his intended action. A simple glance at his phone tells him the time and he can go about his day uninterrupted. Similarly, allowing the user to disable ‘blue ticks’ on Whatsapp, (a feature that shouldn’t have been designed in the first place), frees the user from feeling compelled to respond to a text instantly. He can take his time to react to a notification and decide whether or not to reply, thereby ensuring that he is not pressured into social reciprocity. Platforms like Medium that display the approximate time it will take to read a particular article empower the user by providing the exact time investment. It helps him forecast the consequences of a click, an option not many are willing to offer.

The ‘time to bed’ feature on the iPhone that politely encourages the user to shut his phone and get a good night’s sleep, reminds him of his priorities and promotes a healthier lifestyle. Uber, in an attempt to combat road rage, prompts its drivers to slow down each time they exceed the speed limit through a vigorous red alert on their screens. Apps like Snapchat and Waze that are able to detect motion, advise the user not to type when he is moving or driving. And in a stark contrast to Facebook’s ad strategy that tracks digital behaviour and eerily displays relevant ads, Netflix politely informs you why you’re receiving the suggestion for a particular movie by showing you a match rate based on your past viewing tendencies. In this way, responsible design is entirely achievable without manipulating the consumer and allowing him to make informed decisions to improve the quality of his life.

#design #responsible-design #design-thinking #coding #string

What is GEEK

Buddha Community

Can Design Save the World?
Sasha  Roberts

Sasha Roberts

1659500100

Reform: Form Objects Decoupled From Models In Ruby

Reform

Form objects decoupled from your models.

Reform gives you a form object with validations and nested setup of models. It is completely framework-agnostic and doesn't care about your database.

Although reform can be used in any Ruby framework, it comes with Rails support, works with simple_form and other form gems, allows nesting forms to implement has_one and has_many relationships, can compose a form from multiple objects and gives you coercion.

Full Documentation

Reform is part of the Trailblazer framework. Full documentation is available on the project site.

Reform 2.2

Temporary note: Reform 2.2 does not automatically load Rails files anymore (e.g. ActiveModel::Validations). You need the reform-rails gem, see Installation.

Defining Forms

Forms are defined in separate classes. Often, these classes partially map to a model.

class AlbumForm < Reform::Form
  property :title
  validates :title, presence: true
end

Fields are declared using ::property. Validations work exactly as you know it from Rails or other frameworks. Note that validations no longer go into the model.

The API

Forms have a ridiculously simple API with only a handful of public methods.

  1. #initialize always requires a model that the form represents.
  2. #validate(params) updates the form's fields with the input data (only the form, not the model) and then runs all validations. The return value is the boolean result of the validations.
  3. #errors returns validation messages in a classic ActiveModel style.
  4. #sync writes form data back to the model. This will only use setter methods on the model(s).
  5. #save (optional) will call #save on the model and nested models. Note that this implies a #sync call.
  6. #prepopulate! (optional) will run pre-population hooks to "fill out" your form before rendering.

In addition to the main API, forms expose accessors to the defined properties. This is used for rendering or manual operations.

Setup

In your controller or operation you create a form instance and pass in the models you want to work on.

class AlbumsController
  def new
    @form = AlbumForm.new(Album.new)
  end

This will also work as an editing form with an existing album.

def edit
  @form = AlbumForm.new(Album.find(1))
end

Reform will read property values from the model in setup. In our example, the AlbumForm will call album.title to populate the title field.

Rendering Forms

Your @form is now ready to be rendered, either do it yourself or use something like Rails' #form_for, simple_form or formtastic.

= form_for @form do |f|
  = f.input :title

Nested forms and collections can be easily rendered with fields_for, etc. Note that you no longer pass the model to the form builder, but the Reform instance.

Optionally, you might want to use the #prepopulate! method to pre-populate fields and prepare the form for rendering.

Validation

After form submission, you need to validate the input.

class SongsController
  def create
    @form = SongForm.new(Song.new)

    #=> params: {song: {title: "Rio", length: "366"}}

    if @form.validate(params[:song])

The #validate method first updates the values of the form - the underlying model is still treated as immutuable and remains unchanged. It then runs all validations you provided in the form.

It's the only entry point for updating the form. This is per design, as separating writing and validation doesn't make sense for a form.

This allows rendering the form after validate with the data that has been submitted. However, don't get confused, the model's values are still the old, original values and are only changed after a #save or #sync operation.

Syncing Back

After validation, you have two choices: either call #save and let Reform sort out the rest. Or call #sync, which will write all the properties back to the model. In a nested form, this works recursively, of course.

It's then up to you what to do with the updated models - they're still unsaved.

Saving Forms

The easiest way to save the data is to call #save on the form.

if @form.validate(params[:song])
  @form.save  #=> populates album with incoming data
              #   by calling @form.album.title=.
else
  # handle validation errors.
end

This will sync the data to the model and then call album.save.

Sometimes, you need to do saving manually.

Default values

Reform allows default values to be provided for properties.

class AlbumForm < Reform::Form
  property :price_in_cents, default: 9_95
end

Saving Forms Manually

Calling #save with a block will provide a nested hash of the form's properties and values. This does not call #save on the models and allows you to implement the saving yourself.

The block parameter is a nested hash of the form input.

  @form.save do |hash|
    hash      #=> {title: "Greatest Hits"}
    Album.create(hash)
  end

You can always access the form's model. This is helpful when you were using populators to set up objects when validating.

  @form.save do |hash|
    album = @form.model

    album.update_attributes(hash[:album])
  end

Nesting

Reform provides support for nested objects. Let's say the Album model keeps some associations.

class Album < ActiveRecord::Base
  has_one  :artist
  has_many :songs
end

The implementation details do not really matter here, as long as your album exposes readers and writes like Album#artist and Album#songs, this allows you to define nested forms.

class AlbumForm < Reform::Form
  property :title
  validates :title, presence: true

  property :artist do
    property :full_name
    validates :full_name, presence: true
  end

  collection :songs do
    property :name
  end
end

You can also reuse an existing form from elsewhere using :form.

property :artist, form: ArtistForm

Nested Setup

Reform will wrap defined nested objects in their own forms. This happens automatically when instantiating the form.

album.songs #=> [<Song name:"Run To The Hills">]

form = AlbumForm.new(album)
form.songs[0] #=> <SongForm model: <Song name:"Run To The Hills">>
form.songs[0].name #=> "Run To The Hills"

Nested Rendering

When rendering a nested form you can use the form's readers to access the nested forms.

= text_field :title,         @form.title
= text_field "artist[name]", @form.artist.name

Or use something like #fields_for in a Rails environment.

= form_for @form do |f|
  = f.text_field :title

  = f.fields_for :artist do |a|
    = a.text_field :name

Nested Processing

validate will assign values to the nested forms. sync and save work analogue to the non-nested form, just in a recursive way.

The block form of #save would give you the following data.

@form.save do |nested|
  nested #=> {title:  "Greatest Hits",
         #    artist: {name: "Duran Duran"},
         #    songs: [{title: "Hungry Like The Wolf"},
         #            {title: "Last Chance On The Stairways"}]
         #   }
  end

The manual saving with block is not encouraged. You should rather check the Disposable docs to find out how to implement your manual tweak with the official API.

Populating Forms

Very often, you need to give Reform some information how to create or find nested objects when validateing. This directive is called populator and documented here.

Installation

Add this line to your Gemfile:

gem "reform"

Reform works fine with Rails 3.1-5.0. However, inheritance of validations with ActiveModel::Validations is broken in Rails 3.2 and 4.0.

Since Reform 2.2, you have to add the reform-rails gem to your Gemfile to automatically load ActiveModel/Rails files.

gem "reform-rails"

Since Reform 2.0 you need to specify which validation backend you want to use (unless you're in a Rails environment where ActiveModel will be used).

To use ActiveModel (not recommended because very out-dated).

require "reform/form/active_model/validations"
Reform::Form.class_eval do
  include Reform::Form::ActiveModel::Validations
end

To use dry-validation (recommended).

require "reform/form/dry"
Reform::Form.class_eval do
  feature Reform::Form::Dry
end

Put this in an initializer or on top of your script.

Compositions

Reform allows to map multiple models to one form. The complete documentation is here, however, this is how it works.

class AlbumForm < Reform::Form
  include Composition

  property :id,    on: :album
  property :title, on: :album
  property :songs, on: :cd
  property :cd_id, on: :cd, from: :id
end

When initializing a composition, you have to pass a hash that contains the composees.

AlbumForm.new(album: album, cd: CD.find(1))

More

Reform comes many more optional features, like hash fields, coercion, virtual fields, and so on. Check the full documentation here.

Reform is part of the Trailblazer project. Please buy my book to support the development and learn everything about Reform - there's two chapters dedicated to Reform!

Security And Strong_parameters

By explicitly defining the form layout using ::property there is no more need for protecting from unwanted input. strong_parameter or attr_accessible become obsolete. Reform will simply ignore undefined incoming parameters.

This is not Reform 1.x!

Temporary note: This is the README and API for Reform 2. On the public API, only a few tiny things have changed. Here are the Reform 1.2 docs.

Anyway, please upgrade and report problems and do not simply assume that we will magically find out what needs to get fixed. When in trouble, join us on Gitter.

Full documentation for Reform is available online, or support us and grab the Trailblazer book. There is an Upgrading Guide to help you migrate through versions.

Attributions!!!

Great thanks to Blake Education for giving us the freedom and time to develop this project in 2013 while working on their project.


Author: trailblazer
Source code: https://github.com/trailblazer/reform
License:  MIT license

#ruby  #ruby-on-rails

Landscapes Website Design | Nature Landscapes Website Designer

Most landscapers think of their website as an online brochure. In reality of consumers have admitted to judging a company’s credibility based on their web design, making your website a virtual sales rep capable of generating massive amounts of leads and sales. If your website isn’t actively increasing leads and new landscaping contracts, it may be time for a redesign.

DataIT Solutions specializes in landscape website designing that are not only beautiful but also rank well in search engine results and convert your visitors into customers. We’ve specialized in the landscaping industry for over 10 years, and we look at your business from an owner’s perspective.

Why use our Landscapes for your landscape design?

  • Superior experience
  • Friendly personal service
  • Choice of design layout
  • Budget sensitive designs
  • Impartial product choice and advice
  • Planting and lighting designs

Want to talk about your website?
If you are a gardener or have a gardening company please do not hesitate to contact us for a quote.
Need help with your website?
Get in touch

#nature landscapes website design #landscapes website design #website design #website designing #website designer #designer

Juned Ghanchi

1621315250

Designing Mobile Apps using the latest UI Design Principles

The mobile technology world is growing at the speed of light, and the apps have become an integral part of our daily life. We can now see an influx of technology with tools that can help create mobile apps. All of them are becoming more accessible and hence people are getting on their first app making journeys. Since the mobile app industry is getting bigger and better than ever, businesses from all corners of the world are trying to develop mobile apps for their operations and marketing. Designing a mobile app for businesses is the first step, though. Company owners are in charge of the basic look and feel of the designed product. With a brilliant mobile app design, one can establish a relationship between app and user very well.

Read Blog Here: https://www.indianappdevelopers.com/blog/designing-mobile-apps-using-latest-ui-design-principles/

#designing mobile apps #ui design principles #mobile ui design #mobile app design #ui design #app design

Micheal  Block

Micheal Block

1597748400

Can Design Save the World?

Each time we are faced with the compelling question ‘What kind of world are we leaving for our children?’ it leads to a discussion on physical factors such as plastic-free packaging or organic fabrics that help reduce carbon footprint. But as members of the technological revolution, have we stopped to ask if we are designing responsible experiences for the future? If history is any indication, humans are highly adaptable creatures. Simple behavioral traits at a particular point in time can have far-reaching effects on human evolution. So, truth be told, designing the right experiences that inculcate desirable habits definitely deserves more attention than it presently receives.

But what is a responsible experience? Well, to understand that, let’s first discuss some not-so responsible experiences. Have you ever scrolled through your Facebook wall for a couple of minutes just before going to bed, only to realize that those few minutes have transformed into an hour or even longer? Have you ever said ‘This episode’s going to be my last’, but then ended up binge-watching an entire season on Netflix? Don’t worry, we’ve all been there! So, what are these apps goading you into doing? Basically, they act as bottomless pits of information, shamelessly pushing more and more content your way, till you are forced to stop. In simple words, they’re hijacking your brain. Another excellent example of this is to notice the number of times that you look at your phone to know the time. Do you ever just glance and stop? Or do you lift your phone, open up some apps and spend another 5–10 minutes scrolling aimlessly, completely oblivious to the fact that all you truly wanted to do was check the time?

Research conducted by British psychologists shows that young adults check their smartphones roughly twice as much as they estimate that they do. We are a society of pending notifications and blue ticks that are screaming at us, waiting to be noticed. To add insult to injury, we’ve been trained to respond to these signs as if they were natural parts of our existence. This is what illustrates an experience that makes poor use of our time, distracts us from our intended action and leaves us feeling unproductive. Responsible design, on the other hand, effortlessly enriches our daily actions, ultimately improving our everyday behaviour.

Google Pixel’s ‘always on’ display is a perfect example of this phenomenon. The designers at Google developed a screen that always displays the time and date, even when the screen is unused. This is a silent indication to the user that he needn’t even move to perform his intended action. A simple glance at his phone tells him the time and he can go about his day uninterrupted. Similarly, allowing the user to disable ‘blue ticks’ on Whatsapp, (a feature that shouldn’t have been designed in the first place), frees the user from feeling compelled to respond to a text instantly. He can take his time to react to a notification and decide whether or not to reply, thereby ensuring that he is not pressured into social reciprocity. Platforms like Medium that display the approximate time it will take to read a particular article empower the user by providing the exact time investment. It helps him forecast the consequences of a click, an option not many are willing to offer.

The ‘time to bed’ feature on the iPhone that politely encourages the user to shut his phone and get a good night’s sleep, reminds him of his priorities and promotes a healthier lifestyle. Uber, in an attempt to combat road rage, prompts its drivers to slow down each time they exceed the speed limit through a vigorous red alert on their screens. Apps like Snapchat and Waze that are able to detect motion, advise the user not to type when he is moving or driving. And in a stark contrast to Facebook’s ad strategy that tracks digital behaviour and eerily displays relevant ads, Netflix politely informs you why you’re receiving the suggestion for a particular movie by showing you a match rate based on your past viewing tendencies. In this way, responsible design is entirely achievable without manipulating the consumer and allowing him to make informed decisions to improve the quality of his life.

#design #responsible-design #design-thinking #coding #string

Security Website Design

As web developers, we strive to meet your specific needs by creating a website that is user-friendly and remains relevant to the current design trends. This ensures that your website grabs the attention of your audience and keeps you ahead of your competitors.

DataIT Solutions team of experts works collaboratively to create ideas that can meet your requirements. Our Website Designing Company believes in High-Quality Professional Website Designing for your Security Website Designing. Our designers have experience in working on a wide array of projects, including websites of the next generation. We listen to your needs and then deliver.

Our Expertise includes:

  • Dot Net Development
  • PHP Development
  • HTML5 Development
  • IOS App Development
  • Android App Development
  • Website Security services

Our team of experts has the expertise, knowledge, and skills to take control and dominate the web design industry over the next couple of years. They are on hand to listen to your ideas, goals, and help you to have a website that is unique and works with your business and brand.

Looking for a better design? Need a professional web design?
Get in touch with our, Web Design Professional experts.

#security website design #security website designing #security website designer #website designer #website designing #website design