Monthly Archiv: January, 2019

DDD Europe notes – Day 1

Eric Evans: Keynote ("Language in Context")

Starting out with the basics (words have meaning within a context; when we make the boundary of this context explicit we end up with a bounded context), Eric discussed two main topics: the Big Ball of Mud, and bounded contexts in the context (no pun intended) of microservices.

Legacy applications are always framed in a negative way, as if it's something to get away from. Personally, I've come to enjoy them a lot. However, there will always be the urge to work around legacy code. The Bubble Context (PDF) can be a great way of creating a new model that works well next to the already existing models. To keep a safe buffer between the new and the old model, you could build an Anti-Corruption Layer (ACL). A fun thing Eric mentioned is that the buffer works in two directions. The ACL also allows the old model to keep functioning without being disturbed by all the new things that are going on in the Bubble Context.

Given that a bounded context may or may not align with an actual subdomain, it may very well be that a legacy context is actually a Big Ball of Mud, with unified models, and simply just a lot of domain knowledge written between the many spaghetti lines that are in there. However, even though it is a mess, and it's getting harder to work with it every day, it may still be what you could call a "Mature Productive Context". The question is: is it still aligned with business views? If it is, we could improve at least maintainability and the cost of change by performing local refactorings. If it isn't, it'll be very hard to change anything. If the basic assumptions of the model change, rework will be very costly.

As a matter of fact, for a project I'm currently working on, we're looking into a module (or context), which requires some heavy refactoring, because it has become technically very hard to work with it. However, the business is still quite happy about it, and it's quite central to its processes.

An important Domain-Driven approach which can be used in the area of legacy code is where you analyze the different subdomains, and find out which ones are generic, and which ones are "core" to the business. As an example, in the aforementioned project there are actually two candidates for context-level improvements. One is related to Sales (which is the heart of this financial application), and one is related to Addressbook records (which is very much supportive to the Sales part). One could say it's even generic, in the sense that an off the shelf solution might be preferable. We wouldn't want to spend a lot of design or development effort there either.

Eric mentioned the term "Quaint Context" as a suitable name for a context that one would consider "legacy". It uses outdated technology probably, and has become hard to maintain. It won't be possible to make big changes there (as mentioned, because these basic assumptions can't easily be changed), so another good name could be "Patch-by-Patch Context".

With a microservice architecture, another option to deal with legacy contexts becomes what Eric calls the "Exposed Legacy Asset" (yet another nice term!). This will be a legacy application which starts to adapt to the microservices environment by producing messages that will be useful for actual microservices in that environment. For instance, database triggers could be used to produce events. The external events themselves don't have to be as low-level as the internal events that caused them.

Eric touches on several other interesting aspects of microservice architecture, but I wanted to briefly mention some other relevant ideas here. Eric looked back at 15 years of Domain-Driven Design and proposed that by now we maybe need a definition of DDD itself. He doesn't want DDD to be just a club, but asks for intellectual honesty. If you try to apply DDD and somehow it fails, you should share this story. If you're skeptical about some aspect of DDD, talk about it. I like how it boils down to focusing on the core domain, exploring models together, and speaking a ubiquitous language in an explicitly bounded context. Nice!

Rebecca Wirfs-Brock: Growing Your Design Heuristics Toolkit

This one was a workshop with limited access, so I was lucky I could attend it. Rebecca had spoken in a previous edition of the conference about heuristics, which triggered my interest in the idea. The workshop was about the process behind it. It had some interesting pointers, like a PDF about the concept and a book by Billy Vaughn Koen: Discussion of the Method. Definitely things to check ou

Truncated by Planet PHP, read more at the original (another 2340 bytes)

20 Free Bootstrap UI Kits

Bootstrap is one of the most popular design frameworks. One of the reasons it’s so popular is that it’s optimized for mobile devices and has a well-organized grid system along with hundreds of elements that make prototyping and designing for the web a lot easier.

There is no doubt that Bootstrap is the best framework to help you design beautiful and responsive web pages. From minimal startup websites to complex admin screens, you can find Bootstrap UI kits and templates for any design. Get inspired by these free Bootstrap UI kits and use them in your next design project.

In this roundup, we’ve collected 20 free UI kits built with Bootstrap (both 4 and 5) that you can use as a starting point for your designs.

Free Bootstrap 5 UI Kits

Pixel Free Bootstrap 5 UI Kit

The free Pixel Bootstrap 5 UI kit comes bundled with over 80 UI elements, 5 example page templates, and more than 50 website sections, so you build any type of website.

pixel bootstrap 5 five template ui kit free responsive

Snacked Bootstrap 5 Admin Template

Snacked is Bootstrap 5 admin template and UI kit that comes with over 60 custom HTML page templates, multiple chart options, and a vast collection of UI components.

snacked bootstrap 5 five template ui kit free responsive

Boomerang Free Bootstrap 5 UI Kit

This free Bootstrap 5 UI kit includes over fifty custom components, five integrated plugins, and five pre-built page templates. Boomerang kit is perfect for building a business or corporate website.

boomerang bootstrap 5 five template ui kit free responsive

Qexal Bootstrap 5 Landing Pages

The minimally designed Qexal is perfect for creating landing pages for startups or any other type of business. It comes with nine homepage variations, multiple page templates, and a huge collection of UI components and widgets.

Qexal Landing Pages bootstrap 5 five template ui kit free responsive

Lindy Free Bootstrap 5 Startup UI Kit

The free Lindy Bootstrap 5 UI kit includes everything you need for creating professional startup landing pages. The UI kit comes with over 200 UI elements and 5 example page templates.

Lindy stratup bootstrap 5 five template ui kit free responsive

Free Material Design Bootstrap 5 UI KIT

This free Material Design Bootstrap 5 UI kit is an excellent choice for anyone that wants to build a mobile-first website or an app. The kit comes with 400+ material UI elements, 600+ material icons, over 70 CSS animations, numerous templates, tutorials, and much more.

Material Design bootstrap 5 five template ui kit free responsive

WrapKit Lite – Free Bootstrap 5 UI Kit

WrapKit Lite is a free Bootstrap 5 UI kit that can be used in a variety of projects. It comes with a selection of UI blocks and more than 25 UI elements, and 1 landing page to jumpstart your project.

Wrappixel bootstrap 4 four template ui kit free responsive

Material Kit – Free Bootstrap 5 Material Design UI Kit

Material Kit is a perfect choice for anyone who loves the material design. The Bootstrap 5 UI kit comes with over 60 UI elements and three demo page templates to help you get started on your design.

Material Kit design bootstrap 4 four template ui kit free responsive

Free Bootstrap 4 UI Kits

Argon – Free Dashboard UI for Bootstrap 4

The Argon UI kit for Bootstrap is the perfect choice if you’re working on a dashboard design. The kit comes with over 100 components, 6 different screens, and 4 custom plugins.

Argon admin Dashboard bootstrap 4 four template ui kit free responsive

Grandin Bootstrap Admin UI Kit (Envato Elements)

Powered by Grunt, Bower, and SCSS, Grandin is a professional UI kit that comes packaged with plenty of UI components, widgets, forms, tables, charts, pages and applications.

Grandin admin Dashboard bootstrap template ui kit free responsive

Shards Free Bootstrap 4 UI Kit

The free Shards Bootstrap UI kit comes with 10 extra custom components and 2 custom pre-built landing page templates. You’ll also find more than 1,500 icons both from Material and FontAwesome packs.

Shards admin dashboard ux High-Quality bootstrap 4 four template ui kit free responsive

Dashboard HTML Template for Bootstrap 4 (Envato Elements)

This lightweight Bootstrap 4 UI kit includes five dashboard layouts, over 100 components, and a complete set of UI elements, including charts, forms, calendars, tables, and many more.

admin Dashboard bootstrap template ui kit free responsive

Drunken Parrot Lite Bootstrap 4 UI Kit

This kit includes both HTML and PSD files so you can easily customize and tweak the design to suit your needs. The kit is lightweight and it comes with various components and pages that will help to speed up your design process.

Drunken Parrot Lite bootstrap 4 four template ui kit free responsive

Now Free UI Kit for Bootstrap 4

Now UI Kit is a responsive Bootstrap 4 kit provided for free by Invision and Creative Tim. It features over 50 elements and 3 page templates. The kit provides PSD, Sketch, and HTML versions.

now web bootstrap 4 four template ui kit free responsive

Fuzen Bootstrap 4 Admin UI Kit (Envato Elements)

Fuzen is a Bootstrap 4 UI kit that comes bundled with three dashboard layout templates, over 200 UI components, over 3,000 icons, and multiple widgets. It has been designed with Material Design in mind.

admin Dashboard bootstrap template ui kit free responsive

NowSquare – Free Collection of Bootstrap 4 Web Blocks

Built upon Bower, GulpJS, and Sass, this free collection of web blocks has been designed for Bootstrap 4 and allows you to get ahead on your design project. The kit is easy to use straight out of the box and can be easily customized to the needs of your project.

NowSquare bootstrap 4 four template ui kit free responsive

Froala Design Blocks for Bootstrap 4

This Bootstrap UI kit includes over 170 responsive design blocks that are ready to be used in your web or mobile apps. You’ll find blocks for calls to action, profile blocks, contact, blocks, forms, headers, and more.

Froala Design Blocks bootstrap 4 four template ui kit free responsive

Paper Dashboard – Free Bootstrap 4 Admin UI Kit

The Paper Dashboard is another great choice if you need to prototype and design an admin dashboard for your project. The UI kit comes with 16 components, 4 customized plugins, and 7 demo page templates.

Paper Dashboard admin bootstrap 4 four template ui kit free responsive

Anchor – Free Bootstrap 4 UI Kit

Anchor is a free Bootstrap UI Kit with flexible, ready to use UI components that will help you build websites faster. It features a modern and colorful design.

anchor bootstrap 4 four template ui kit free responsive

Stream Free Bootstrap 4 UI Kit

The Stream UI Kit is a beautiful and elegant Bootstrap 4 UI Kit. The UI kit comes with five beautiful complete page templates and includes over 20 reusable and customizable UI Blocks.

stream bootstrap 4 four template ui kit free responsive

Bootstrap 4 Startup UI Kit

Try the Bootstrap 4 Startup UI kit if you’re working on the website design of a startup. The kit features a clean and minimal style and comes with 16 UI cards that you can mix and match to create your own unique layouts.

Startup bootstrap 4 four template ui kit free responsive

Free Bootstrap 4 eCommerce UI Kit

Check out this kit if you’re designing an e-commerce website or an application. The template comes with several starter templates to get you started as well as numerous icons and elements.

eCommerce shop bootstrap 4 four template ui kit free responsive

The post 20 Free Bootstrap UI Kits appeared first on Speckyboy Design Magazine.

Site News: Blast from the Past – One Year Ago in PHP (01.31.2019)

Here's what was popular in the PHP community one year ago today:

Using img2lambda to publish your Serverless PHP layer

This interesting tweet by Clare Liguori came to my attention last week:

Img2lambda tweet2

This new img2lambda tool will take the layers of a Docker container and convert them to AWS layers for use in Lambda.

I poked around with Clare's example and updated my lambda-php project in order to understand how it works. I also rewrote my runtime's bootstrap to make it clearer.

The clever thing from my point of view is that you can build your PHP runtime layer locally using Docker and then publish the layers to AWS for use in your Lambda functions. This means you can now use the layer in different projects and have them all reference the same PHP runtime.

The magic of Docker

This is all done with the magic of Docker. Specifically, we create a Dockerfile that creates to containers:

  • A container to build the PHP binary
  • A container containing the layers that img2lambda will upload to AWS

Simplified, it looks like this:

# Build PHP in the Lambda container
FROM amazonlinux:2017.03.1.20170812 as builder

# PHP version of create
ARG ver="7.3.1"

RUN sed -i 's;^releasever.*;releasever=2017.03;;' /etc/yum.conf && \
    yum clean all && \
    yum install -y autoconf bison gcc gcc-c++ make libcurl-devel {etc}

RUN curl -sL https://github.com/php/php-src/archive/php-${ver}.tar.gz | tar -xvz && \
    cd php-src-php-${ver} && \
    ./buildconf --force && \
    ./configure --prefix=/opt/php/ --with-openssl --with-curl --{etc} && \
    make install && \
    /opt/php/bin/php -v

# copy php binary into /runtime/bin/php
RUN mkdir -p /runtime/bin && \
    cp /opt/php/bin/php /runtime/bin/php

# copy bootstrap files into /runtime
COPY src/* /runtime/


# Create runtime container for use with img2lambda
FROM lambci/lambda:provided as runtime

 COPY --from=builder /runtime /opt/

The first part download and compiles the PHP binary and puts it into /runtime/bin/php and also copies in the bootstrap files required to make the layer act as a Lambda runtime.

The second part simply copies all the files in /runtime in the first container into a new container. This new container containers a single layer which is our PHP runtime.

To build it we do:

$ docker build -t lambda-php-runtime .

The tag name can be anything.

Create the the layer in AWS

To create the AWS layer we use img2lambda:

$ img2lambda -i lambda-php-runtime:latest -r eu-west-2 -n lambda-php73

This tool will find the layer in the runtime container and upload it to eu-west2 and then store the identifier in output/layers.json which looks like this.

[
  "arn:aws:lambda:eu-west-2:66...06:layer:lambda-php73-sha256-e3c4...2e618b:1"
]

Using in Serverless Framework

You can take the ARN number and use it for your actions in serverless.yml like this:

functions:
  hello:
    handler: handler.hello
    layers:
      - "arn:aws:lambda:eu-west-2:66...06:layer:lambda-php73-sha256-e3c4...2e618b:1"

This is the way that we can re-use our PHP runtime in all our actions across multiple projects.

Serverless also allows you to import data from JSON files into your serverless.yml file, so you can also do:

functions:
  hello:
    handler: handler.hello    # {file name}.{function name}. In this case: hello() in handler.php
    layers:
      ${file(../php-runtime/output/layers.json)}

This has the advantage that when you re-build and upload PHP runtime layer, your project picks it up, which could also be convenient.

Testing locally

One of the benefits of building the runtime in Docker is that we can run it locally for testing our Lambda function. As our runtime container inherits from lambci/lambda:provided, we get an environment that looks very much like Lambda itself.

To test locally, we use another container and inherits from our runtime one and copies in the PHP files for our function. The Dockerfile looks something like this:

FROM lambda-php-runtime as function

COPY handler.php /var/task/src/handler.php

We create our cont

Truncated by Planet PHP, read more at the original (another 1321 bytes)

Snippets That Celebrate Old School Tech

One of the more fascinating things that happen to us in adulthood is the emerging feeling of nostalgia. We think about the TV shows we watched, the games we played and the places we visited. Even if you didn’t care much for something at the time, the memories are nonetheless enjoyable.

And, when you reach a certain age, you might find yourself wanting to revisit the technology that was such a part of your life. Yes, suddenly you pine for the days of the VCR or that ancient Commodore 64.

As silly as it may seem, many of us just love these old hunks of junk. The design community especially holds them in high esteem, as you’ll see from the excellent code snippets below.

The Web Designer Toolbox
Unlimited Downloads: 500,000+ Web Templates, Themes, Plugins & Design Assets


The Original All-In-One

These days, computer manufacturers love to tout their all-in-one systems. But back in the day, everything was that way (albeit in a massive, immovable package). This example pays homage to those old computers in 3D. Just use the included sliders to rotate your view.

Distorted Playback

Before the DVR came in with its crystal-clear HD playback, there was the humble VCR. Depending on your home entertainment setup, you could record your favorite show after performing approximately 10 agonizing steps. When it was time to watch, you were then treated to playback that featured jagged horizontal lines – just like the ones in this snippet.

A Gaming Icon Becomes an Icon

The Nintendo Gameboy may seem a little quaint when compared with the likes of the Switch. But it revolutionized portable gaming. Take as many mini-cartridges with you as you like (and a few boxes of batteries) and play all the way to Grandma’s. The beautiful irony of this example is that the system is reimagined as an iOS app icon – the new portable wonder.

May I Have This Breakdance?

In the olden days, we wanted everyone to hear our music. The boombox was the perfect way to make it happen. It was portable (even if a bit heavy) and was incredibly loud. To relive the experience, hit the play button on this snippet and get down to some fresh beats.

It’s a Phone – For Your Car!

It’s a safe bet that we take our smartphones for granted. Yet, even the cheapest ones can do things we never imagined back in the 1990s. Take, for example, this gigantic monstrosity that passed for high-tech. There was no texting, no screen – it was just meant for voice communication. Even if you’ve never seen one in person, this snippet lets you explore the device in eye-popping 3D.

I Made You a Mixtape

The original Sony Walkman took the big, bulky cassette player and put it in your pocket (you just need really big pockets). This piece of tech history brought the concept of a “personal” music player mainstream. Here, you can explore an interactive facsimile with working buttons and even a removable cassette.

When Your TV Was Also Your Monitor

In the early days of home computing, televisions often pulled double-duty as monitors. Of course, the potential for screen burn-in meant that you might forever be reminded of how bad an idea this was. This fun example shows off a Commodore 64 error screen, complete with retro TV set.

Meet Me at the Arcade (and Bring Lots of Money)

Some of the best old school tech never made it into most homes. But the arcade was one place you were sure to find the best graphics and sound of the day. The full-sized games, like this incredible 3D Pacman machine, were large enough to house all the necessary equipment. No wonder it was so popular.

How the Old Inspired the New

It’s no surprise that much of this technology still holds an influence. For the web design community, it’s less about the hardware and software advancements – although they are certainly of great importance.

The real influence can be found in the areas of UI and UX. For many of us, these devices were our first taste of interacting with a screen. Gaming machines, for example, needed to have a dead-simple UI and be intuitive enough that anyone could play.

On the other hand, clunky interfaces (like that of the VCR) were lessons in frustration. Thinking about the less-than-ideal ways to perform various tasks help us to more fully appreciate the technology that made things easier.

Overall, the items above were not only fun, they have also inspired us to create a better user experience. It’s almost like they were preparing us for this career path all along.

The post Snippets That Celebrate Old School Tech appeared first on Speckyboy Web Design Magazine.

Laravel PHP Global Search

Package:
Laravel PHP Global Search
Summary:
Provide search capabilities to data objects
Groups:
Databases, Libraries, PHP 5, Searching
Author:
Nyi Nyi Lwin
Description:
This package can provide search capabilities to data objects...

Read more at https://www.phpclasses.org/package/11058-PHP-Provide-search-capabilities-to-data-objects.html#2019-01-30-20:04:30

WordPress 5.1 Beta 3

WordPress 5.1 Beta 3 is now available!

This software is still in development, so we don’t recommend you run it on a production site. Consider setting up a test site to play with the new version.

There are two ways to test the WordPress 5.1 beta: try the WordPress Beta Testerplugin (you’ll want to select the “bleeding edge nightlies” option), or you can download the beta here (zip).

WordPress 5.1 is slated for release on February 21, and we need your help to get there!

Site Health Check

One of the features originally slated for WordPress 5.1—the PHP error protection handler—will target WordPress 5.2 instead. Some potential security issues were discovered in the implementation: rather than risk releasing insecure code, the team decided to pull it out of WordPress 5.1. The work in #46130 is showing good progress towards addressing the security concerns, if you’d like to follow development progress on this feature.

Additional Changes

A handful of smaller bugs have also been fixed in this release, including:

  • TinyMCE has been upgraded to version 4.9.2 (#46094).
  • The block editor has had a couple of bugs fixed (#46137).
  • A few differences in behaviour between the classic block and the classic editor have been fixed (#46062, #46071, #46085).
  • When adding rel attributes to links, ensure the value isn’t empty (#45352), and that it works as expected with customizer changesets (#45292).

Developer Notes

WordPress 5.1 has many changes aimed at polishing the developer experience. To keep you informed, we publish developers’ notes on the Make WordPress Core blog throughout the release cycle. Subscribe to the Make WordPress Core blog for updates over the coming weeks, detailing other changes in 5.1 that you should be aware of.

How to Help

Do you speak a language other than English? Help us translate WordPress into more than 100 languages! The beta 2 release also marks the soft string freeze point of the 5.1 release schedule.

If you think you’ve found a bug, you can post to the Alpha/Beta area in the support forums. We’d love to hear from you! If you’re comfortable writing a reproducible bug report, file one on WordPress Trac, where you can also find a list of known bugs.


In just a few weeks
WordPress Five-One will be here.
Your testing helps us!

Ketting 2.5 release.

Ketting is an attempt at making a generic Hypermedia API client for javascript. It uses a ‘link’ and following links as the most important primitive.

Last week I released version 2.5.0 on NPM so maybe it’s time to list some of the improvements since the last update in order from most to least interesting.

JSON:API support

JSON:API is a standard for making JSON-based APIs, and it has some support for hypermedia ideas as well.

In particular, the standard has a links object, and it also defines a relationship between collections and members of collections.

This release now ships with a ‘representor’ for JSON API, which means you can now do something like this:

const myResource = await home
  .follow('next') // This might be a html5 document
  .follow('author') // This might be a HAL document
  .follow('about') // This might be a JSON:API document

All of these will now be seamless regardless of which format any of these hops used, only when you get() and put() the format is relevant again.

A lot of help in getting this right came from JSON:API community members such as Gabe Sullice and Ethan Resnick. If you’re interested in the full discussion about how JSON:API maps to HATEOAS read the Github issue.

go() function

Not every endpoint will have every appropriate link to another resource. Sometimes you just have to work with what you have, and fetch a resource yourself.

The go() function is a function that exists on a resource and simply gives you a new resource based on the url you passed. The url can be relative and will be resolved based on the ‘current’ resource.

const anotherResource = resource.go('?q=hello');

Resource is generic

If you use typescript with this package, it might be desirable to have some typing.

Adding good support for this will be an ongoing process, but as a first step the Resource class is now generic.

This means that you can define a function such as:

function foo(): Resource<MyBodyType> {
  // ...
}

Typescript will then use MyBodyType as the type that will be returned from get() and refresh() and will demand that the value passed to put() has this type.

By default this is any.

I think this is a decent first step, but I also imagine this will have to continue to evolve.

esModuleInterop is false

The Typescript build now has esModuleInterop off. Apparently keeping it set to true caused anyone who uses the library and has this setting set to false to get errors.

So in order to not force people to change this setting, esModuleInterop is now off, which means the library will work regardless of your own preference.

Powered by Gewgley