Vue 3

It’s out! Congrats to the Vue team for getting it done, I know it was a massive effort and a long time coming. All new docs, as well.

I like it’s still a priority that Vue can be used with just a <script> tag with no build process at all. But it’s ready for build processes too.

Vue 3.0 core can still be used via a simple <script> tag, but its internals has been re-written from the ground up into a collection of decoupled modules. The new architecture provides better maintainability, and allows end users to shave off up to half of the runtime size via tree-shaking.

If you specifically want to have a play with Vue Single File Components (SFCs, as they say, .vue files), we support them on CodePen in our purpose-built code editor for them. Go into Pen Settings > JavaScript and flip Vue 2 to Vue 3.

The train keeps moving too. This proposal to expose all component state to CSS is an awfully cool idea. I really like the idea of CSS having access to everything that is going on on a site. Stuff like global scroll and mouse position would be super cool. All the state happening on any given component? Heck yeah I’ll take it.


The post Vue 3 appeared first on CSS-Tricks.

You can support CSS-Tricks by being an MVP Supporter.

Matt Mullenweg Clarifies Jamstack Remarks

Two weeks ago, Matt Mullenweg made some pointed remarks in an article from The New Stack, calling Jamstack “a regression for the vast majority of the people adopting it.” In preparation for an upcoming article that will include comments from leaders across both the WordPress and Jamstack communities, I asked Mullenweg if he stands by his remarks characterizing Jamstack as a regression. His response was lengthy and is printed here in its entirety to preserve cohesion.

Q: Do you stand by your remarks that Jamstack is a regression for the vast majority of the people adopting it?

Answer:

“Vast majority of people adopting it” was probably too harsh, because there isn’t a vast number of people adopting Jamstack in the first place, and those who do are probably fully aware of the tradeoffs. There are some good reasons, for certain situations, to decouple and add complexity to your architecture, and WordPress’ REST API works fantastically as a backend there. But I worry they are over-selling the promise of what’s really an architectural decision. If you look at the benefits they purport, it’s better performance, security, scaling, and developer experience:

Better Performance: You can achieve the same performance by putting a great CDN like Cloudflare on top of WordPress, and your life will be infinitely easier when you want to add dynamic features like a store or comments. You can also easily find a static WordPress host like Strattic or Shifter.

Higher security: I don’t believe that introducing a number of proprietary and sub-scale SaaS services like Netlify into your stack will make your site more secure. I believe the most secure thing you can do is run fully open source code, as widely vetted and used as possible, on servers you control, or from the fewest number of vendors possible. WordPress securely runs some of the most attacked websites on the internet, including major media, Facebook, and WhiteHouse.gov. Having this many moving parts doesn’t inspire confidence:

Cheaper, easier scaling: CDNs are more expensive than normal hosting accounts, and you can get WordPress running on a decent host for less than $5/mo. And there are even more powerful offerings: The personal plan on WP.com can serve tens of millions of visitors per day, to the website or the headless API, includes a global CDN, and a domain name for $4/mo, and we still have a profit margin. GraphCMS starts at $29/mo and only gives you “5,000 entities,” whatever that means. Contentstack is $3,500/mo. And that’s just for the headless CMS part! You still need to sign up and pay for a bunch of the other stuff in that graphic before you have a website a human can visit in a browser.

Better developer experience: If your developer wants to copy and paste updates from marketing to the website, sure, but if they want people to be able to update the website without their help, they should go with something easier for users like WordPress. If you’re curious about the developer experience, or an investor thinking about this space, I really suggest you watch this three hour and thirty minute tutorial to really understand what is being sold under the premise of “better”:

Have I ever built stuff like that? Totally! It can be a ton of fun, like building a rocket at home or fixing up an old car. I’ve seen some awesome sites built on decoupled architectures or static publishing, using headless WordPress rather than the CMS’s above, but still a similar idea. People are trying to paint me as being against Jamstack, but that is as foreign to me as being against duct tape — it’s good for some things, bad for others, and it’s not going away. I just wish they would be more intellectually rigorous and honest when marketing it. I expect a Jamstack-like approach to exist forever, just like the ideas behind Jamstack pre-date it getting jammed down our throats by Netlify’s marketing team.

Biilmann has got the Ballmer / iPhone story backwards — Microsoft’s mistake there was they made something too complicated, and the iPhone simplified it. Jamstack introduces numerous vendors, build steps, network calls, interfaces, even billing relationships for something that’s a single button press in WordPress.

The reason services like WordPress.com and Shopify are growing so much is they are taking things that were complicated and making them simpler and accessible to a much wider audience. My mission is to democratize publishing and commerce, to make it radically accessible to everyone regardless of technical or economic ability, and increase the freedom and openness on the internet. As I said on Twitter, the first 15 years of WordPress were just the first few chapters. I’m looking forward to building and rebuilding the platform the rest of my lifetime, and when that comes to an end I hope future generations will carry the torch.

Gutenberg’s Custom Spacing Should Be Theme Controlled

Using the padding control for the Group block in the WordPress editor.
Adjusting padding on a Group block.

When Gutenberg 9.0 landed earlier this week, it came with an experimental padding control for the Group block. Most users will not see it unless their theme has opted into supporting the feature using the experimental-custom-spacing flag.

This was not the first that we have seen of the padding option on a block. Gutenberg 8.3 introduced it for the Cover block. Since then, nothing has changed with the implementation.

The problem with the custom spacing/padding option is that it creates an inline style that does not adjust based on the design of the theme. Fortunately, the feature is still experimental. This means that we have time to reevaluate how it works.

Unless we’re doing away with any remaining illusion that themes will play an important aspect of WordPress’s future and front-end design becomes fully entrenched within core, theme authors need some level of control. And, even if themes are going the way of the dinosaur, custom padding numbers on the block level will create design consistency issues down the road. Using 100 pixels of padding might make sense within a site’s current design, but 96 pixels might make sense within a future design. When a user adds dozens or hundreds of blocks with custom padding today, it will wreak havoc on tomorrow’s spacing and rhythm.

Besides that, the average user has little concept of design rules. Having a standardized system for spacing would give theme authors control over the output while giving end-users the ability to customize the look.

I have argued that WordPress needs some sort of design framework. For example, Tailwind CSS has specific padding classes. So does Bootstrap and nearly every other CSS framework. The web development community has been down this road. It is a well-trodden path, and WordPress is not innovating by using inline styles.

If the WordPress platform is going to put this sort of power into the hands of its users, it should do so in a way that allows designers to do their thing and not push users toward semi-permanent, inline-style soup in their content.

Pre-Gutenberg, I would have been entirely against the idea of WordPress introducing any sort of CSS or design framework. However, the platform is consistently moving toward becoming a UI-based design tool rather than simply a way to manage content. Users will have design-related options on a global scale all the way down to individual blocks. Users should absolutely have the ability to adjust a block’s padding in such a system. They should not need an understanding of CSS to do so. Instead, for most use cases, users should be able to adjust padding based on whether they want larger or smaller spacing, not specific CSS values.

I propose a full set of standardized padding classes. The same would go for margins or other design-related options down the road. Gutenberg/WordPress should create a set of default values for these classes, which theme authors could override based on their design.

This is not a new concept. Dave Smith, a developer for Automattic, introduced a patch in 2019 that used named selectors for spacing on the Group block. He gave the following reasoning for choosing this approach over absolute values:

Imagine you are a Theme designer. You craft your CSS with spacing that is perfect for the design. You want to ensure that is consistent throughout your Theme, even if the page layout is being created by the end-user in the Block Editor.

With the approach I’ve taken here, when a size is selected only classes are added to the Block in the DOM. This affords the Theme creator the opportunity to provide custom sizes in CSS that are suitable for their Theme. If they opt not to do this then sensible defaults are provided.

With the pixels approach, we’re locking users of the Block into absolute values and asking them to make a lot of decisions that they’d probably prefer not to have to make. It could also lead to an inconsistent visual experience.

This ship has already sailed and sunk with custom colors and font sizes. Gutenberg had an opportunity to standardize class names for these options but left it to theme authors. As a result, there is no standard across the theme market, which means that choosing the “large” font size or the “blue” text color provided by the theme will likely not carry across to the user’s next theme. Now, we are on the cusp of far more design-related options as WordPress moves toward full-site editing. It is time to consider some standards on design-related class names and provide a framework that all themes can use.

Gutenberg could still provide a custom padding option just like it does for colors and font sizes. Users who choose to go this route would be making an explicit choice to work outside of the standard. But, let’s not go down this road of allowing users to set absolute spacing values as the default option.

The Bearing of a Child Takes 9 Months No Matter How Many Women Are Assigned

I quote the title from the book Mythical Man-Month written by Fred Brooks and originated from Theodore von Kármán in the unique form “Everyone knows it takes a woman nine months to have a baby. But you Americans think if you get nine women pregnant, you can have a baby in a month.” Fred Brooks made this a very popular statement in the software industry, with good reasons. The idea behind it is that adding manpower to a late software project makes it later, also called Brooks’ Law.

This is a story about where I have seen this happen and what the result became to be.

Logging As a Last Resort

Motivation

In software development one often finds themselves investigating issues. Depending on the type of the application, various sources of informations can be available: 

  • screenshots
  • verbal description of the problem
  • metrics
  • logs (application, framework, container, application server, OS, ...)
  • thread and heap dumps

In an ideal world, the exact inputs that caused an issue and the code that failed would be immediately available. In a typical case though, it can take hours of digging through logs and code to understand what happened. Would it not be nice to avoid that?

Why Do You Need to Get Microsoft Certified: Azure AI Engineer Associate Certification?

AI has been a revolutionary technology in the Tech world. The demand for artificial intelligence-related professions is increasing at an incredibly rapid rate. Similarly, the demand for an Azure AI Engineer is on buzz and at an all-time high. Many other AI-concerned accreditations could also be good alternatives for IT professionals. But, MS Azure assures a rapidly growing Artificial Intelligence landscape with innovative service offerings and advanced technologies. Hence, the demand for Microsoft Azure AI Engineer Associate Certification has increased to a large extent over the past few decades.

The future platform of the IT accreditation, AZURE AI mainly assists you to scrutinize AI services which count bots, agents, language, vision, speech, by adopting knowledge mining, cognitive services, and machine learning. AI solutions are required to satisfy scalability and performance to meet end-to-end solutions, for that we need to have advanced technologies and tools for analyzing and recording timely operation. 

Kick-off Your Transformation With a Pre-Mortem

Large scale change initiatives (Lean, Agile, etc.) have a worryingly high failure rate. A chief reason for which is that serious risks are not identified early. One way to create the safety needed for everyone to speak openly about the risks they see is by running a pre-mortem workshop. Pre-mortems leverage a psychological technique called ‘prospective hindsight’ – imagining that the transformation had already failed, and walking backward from there to investigate what led to the failure.

When asked by the editor of the online science and technology magazine Edge.org to share one brilliant but overlooked concept or idea that he believes everyone should know, the Nobel laureate Richard H. Thaler, father of behavioral economics, former president of the American Economic Association, and an intellectual giant of our time did not hesitate. “The Pre-mortem!”[1], he said.

Performance Comparison: Neo4j vs Nebula Graph vs JanusGraph

This article describes how the Tencent (HKG.0700) Cloud team compares Nebula Graph with two other popular graph databases on the market from several perspectives.

By their nature of dealing with interconnections, graph databases are perfect for fraud detection and building knowledge graphs in the security field. To better serve the Tencent Cloud business scenarios, the Tencent Cloud Security team has to select a highly performant graph database which fits the business development well, which is how this performance comparison comes into play.

Protecting Hybrid Mobile Apps With Ionic and Jscrambler

Ionic is an open source framework designed to build native-like mobile web applications which target the major mobile operating systems. Targeting different systems with the same codebase speeds up the development process while reducing the time to market and maintainability efforts.

Ionic is built upon Apache's Cordova and is framework-agnostic, meaning that it can be used with any front-end framework such as Angular, Vue, Preact, React or jQuery. 

How To use pluggable process variable persistence with Case Files in jBPM 7

Some times we need to persist case file which includes business information into different database table along with processInstanceId so that you can map business information with particular processInstanceId.  We can achieve this with below steps:

  • Define custom data object,define it as Entity and make sure to extend VariableEntity
    and must implement a Serializable interface, which look like as
  • In kie-workbench, goto Project settings-->Persistence and add custom entity(com.Shippment) and 'org.drools.persistence.jpa.marshaller.MappedVariable' under persistable data object, like as
  • Note down the persistence unit name from the top of the screen and update
    the datasource JNDI and hibernate dialect if needed
  • In kie-workbench,  goto Project->Settings->Deployments->Marshalling Strategie and define the following marshaling strategy which is required for case file persistence 
    • new org.drools.persistence.jpa.marshaller.JPAPlaceholderResolverStrategy("persistenceUnitName", classLoader);
  • Create a case file variable in case  definition of type 'com.Shippment'
  • Start case instance with the following payload
    • Java
       




      x
      10


      1
       {
      2
        "case-data" : {
      3
      "shippment": {
      4
      "com.Shippment":{
      5
      "shippmentId": 1234,
      6
       "shippmentDestination":"IN"
      7
      } } },
      8
       "case-user-assignments" : {  },
      9
        "case-group-assignments" : { }}
      10
      
                    


  • In database schema you can see two tables with name 'Shippment' and 'MappedVariable'. Entries in these tables look like as
    • Java
       




      x


       
      1
      ysql> select * from Shippment;
      2
      +----+------------+---------------------+
      3
      | id |shippmentId |shippmentDestination |
      4
      +----+------------+---------------------+
      5
      |  1 | 1234       |         IN          |
      6
      |  2 | 4321       |         IN          |
      7
      +----+------------+---------------------+
      8
      2 rows in set (0.00 sec)
      9
      
                    
      10
      
                    
      11
      
                    
      12
      mysql> mysql> select * from MappedVariable;
      13
      +-------------+-------------------+--------+------------+--------------+---------+------------+------------+
      14
      | mappedVarId | processInstanceId | taskId | variableId | variableType | OPTLOCK | workItemId | MAP_VAR_ID |
      15
      +-------------+-------------------+--------+------------+--------------+---------+------------+------------+
      16
      |           1 |                14 |     19 |          1 | com.Shippment |       0 |         28 |          1 |
      17
      |           2 |                15 |     20 |          2 | com.Shippment |       0 |         29 |          2 |
      18
      +-------------+-------------------+--------+------------+--------------+---------+------------+------------+
      19
      2 rows in set (0.00 sec)