Tymoteusz Motylewski
/tmotyl
Founder and CTO of Macopedia - a 100% bootstrapped web agency. Writing about e-commerce, challenges of digital transformation, and software development.
Tymoteusz Motylewski
4y ago
#Shopware 6 has two REST APIs which are capable of doing similar things
e.g. placing the order.
Find out which one is better for which use case:
Shopware "Store API":
• go-to API for customer-facing apps (headless frontend, mobile apps)
• Showare PWA uses this API
• it's a public API, no authentication is required
• API logic follows the end-user journey, so endpoints are quite granular
• well tested and documented
Shopware "Admin API":
• powers Shopware Admin Panel vue.js frontend
• provides CRUD-like endpoints
• authentication using OAuth
• useful for building Shopware Apps - to customize Shopware without accessing source code
• not so bullet-proof - e.g. missing validation and docs
If you found this thread valuable:
2. Toss me a follow for more threads on Shopware & B2B e-commerce and software development →
@tmotyl
2. Read the great tutorial about placing an order via Admin API here: https://macopedia.com/blog/news/how-to-create-a-correct-order-using-admin-api-in-shopware-6
Tymoteusz Motylewski
4y ago
Battle-tested framework for analyzing and designing e-commerce integrations:
(avoid mistakes I made over the last 10 years as a software architect and speed up the system analysis phase)
Successful integration of B2B e-commerce with external systems requires good analysis and specification:
• brief, but complete
• top-down, easy to follow
• growing as you gather more data
• building common understanding from day one
Listing API endpoint fields is the last step, not the first one.
Step 1: Draw the ecosystem diagram
• e-commerce in the middle and all connected systems around
• lines connecting systems exchanging data
This will surface many high-level misunderstandings among stakeholders and corporate IT.
And serve as a landscape map for you.
Step 2: Data types and flow direction
For each connection with e-commerce define:
• what kind of data (briefly, e.g. stock, price, order) is exchanged
• in which direction does it flow (from e-commerce; to e-commerce or both directions)
Which system is a "source of truth"?
Step 3: Pushed to e-commerce or pulled in?
Independently from the direction of flow, data can be:
• pushed to e-commerce through its API
• pulled from external API to e-commerce
In other words: Which system is active (connects to API) and which is passive (provides API)?
Step 3: How is data exchange initiated?
• by schedule
• asynchronous on some event, e.g using webhooks
• through events queue
• manually on demand
Step 4: Does data exchange influence end-user flow?
• data can be exchanged in the background (e.g. product information), or
• integration influences end-user flow (e.g. product reservation in the checkout)
The latter must perform well not to become a performance bottleneck.
Step 5: Incremental vs full update & data integrity
• Is data exchanged incrementally,
• or full import is performed every time?
Often forgotten question (especially with incremental updates):
How to assure records removed in source systems are also removed in e-commerce?
Step 6: Interface / endpoint specification
Once you understand the architecture, now it's time to define the details of every API endpoint/interface including:
• data structures
• validations and constraints
• interface type (REST / SOAP/ XML-RPC/ GraphQL...)
TL;DR - 6 Steps for better e-commerce integration
• Draw an ecosystem diagram
• Name data types and flow direction
• Is data pushed to e-commerce or pulled in?
• Exchange incrementally or full updates & Integrity
• Define Low-level interface/endpoint specification
If you found this thread valuable:
1. Toss me a follow for more threads on B2B e-commerce and software development → @tmotyl
2. Here’s a post from a similar topic - how to validate API readiness with no code: https://twitter.com/tmotyl/status/1560046337084768258?s=20&t=1ddqKM0QNMdcEVw9BBJKfw
Tymoteusz Motylewski
4y ago
One of the most annoying daily tasks most developers or project managers have to do is logging time.
The Internet is full of apps helping track time spent in front of the screen. Unfortunately, most of them are built to spy on you or to make a business out of data about your behavior.
I've spent hours researching different tools to help me manage time and attention and log time spent on different projects. I needed an app capable of automatically tracking what programs and tabs I'm actively using on my computer and being serious about privacy.
When it comes to time tracking, there is 1 app I can't live without:
ActivityWatch
And here's why:
Monitoring productivity and attention allows for gaining self-knowledge from numbers, discovering patterns, and managing your bad screen habits,
It Helps track time spent on different projects, and makes it easier to log time when switching contexts during the day,
Track how you spend time writing code: integrates nicely with popular IDEs,
Cross-platform: Runs on Windows, macOS, Linux, and Android.
Privacy / Security / GPDR: Data is stored locally and doesn't leave your device,
API allows easy integration with other tools or automation and further analysis of the data. Being open-source allows extending it and even building products on top
If you want to learn more about yourself, improve attention management, and make logging time less painful (without having to start/stop the timer for every task) I can't recommend using ActivityWatch enough.
Tymoteusz Motylewski
4y ago
A novel about IT in a corporation? Not interested, I have seen too much of it in real life.
This was my first reaction when I heard about the book. But I was wrong. "Phoenix Project" is both entertaining and insightful. After reading it I decided to give a copy to my DevOps Team.
The main character, Bill, is an IT manager who has just been promoted to CIO. Now it's his job to navigate the company's rough waters of technological and organizational transformation.
And he fails—a lot.
Failing and learning from failures is what makes the story worth reading. The challenges and failures Bill was facing sounded strangely (sometimes painfully) familiar to my experience as CTO.
Learning from a fictional story
On one hand, the story helps us understand the mindset and culture behind the DevOps revolution which changed the IT industry for good.
On the other hand, it also gives a lot of actionable insights crucial for understanding modern software development and IT operations.
Two key takeaways for me were the concepts of "The Three Ways" and "For Types of Work".
Let's leave The Three Ways for another time and dig into the Types of Work, especially the impact unplanned work has.
4 Types of work
Business Projects - projects providing value for internal or external customers,
Internal IT projects - infrastructure, tools, automation, the backbone needed for the company to strive.
Updates and changes - a stream of little jobs to keep systems running. Everyday operations, and deployments of changes coming from both project types above.
Unplanned work or recovery work - incidents, bugs, crashes, escalations. The work keeps people awake at night.
Unplanned work is what keeps the teams from actually moving forward with plans and delivering other types of work. It's a productivity killer.
That’s why Erik called it the most destructive type of work. It’s not really work at all, like the others. The others are what you planned on doing, allegedly because you needed to do it.
Unplanned work is what prevents you from doing it. Like matter and antimatter, in the presence of unplanned work, all planned work ignites with incandescent fury, incinerating everything around it. Like Phoenix.
That is why it is so crucial to limit the amount of unplanned work. The problem is that mistakes and shortcuts resulting in unplanned work, are often made long before they are discovered. So it's not possible to limit it by just tuning operations alone. It has to be a coordinated effort across the organization.
Some of the ways to limit unplanned work:
the quality has to be built in from the start, automated testing is a way to go,
plan for the unplanned - never plan 100% of the team capacity, make room for unplanned work,
smaller, more often, and automated releases are crucial for limiting the risk and allowing to recover faster,
plan time to pay the technical debt, by refactoring and covering it with automated tests
P.S. You can read more about the book or grab a copy here
Tymoteusz Motylewski
4y ago
Delegation is a crucial skill for every manager. Yet it's a hard skill to gain and tricky to execute.
On one hand, managers should delegate as much as possible, to empower teams and avoid micro-management. On the other hand, they should mitigate the risk and impact of bad decisions.
It was an eye-opening moment for me when I realized that delegation is not a binary thing.
Between full delegation and not delegating at all, there are several "shades of gray".
Defining precisely which level of delegation we're agreeing to, aligns the expectations of both sides, avoids frustration, and limits the impact of potentially bad decisions.
Here is a very useful delegation framework created by Management 3.0:
#1. Define a list of tasks and decisions you want to set delegation policy for
It can be anything from buying a book for the team library to hiring new team members.
#2. Discuss which level of delegation from the following 7 should be used
Tell: I will tell them what to do
Sell: I will try to explain my decision to them
Consult: I will consult them before making a decision
Agree: We will agree together, both sides have the right to veto
Advise: They decide, but need to ask me for advice before making a decision
Inquire: I want to be informed of what decision they took
Delegate: I will fully delegate, I don't need to know what decision was taken
During the discussion, you will discover that delegation is context specific. Should it be level 4 or 6? It depends!
The key is to define the safe boundaries in which you can delegate more.
For example, if the cost of the purchase is below $1000 delegation level can be "6. Inquire", if it's above $1000 you require them to advise you before a decision - so level "5 Advise".
#3. Revisit the delegation list and celebrate
Revisiting the delegation list regularly e.g. once a quarter will allow you to reflect on where your team members are making good decisions and gaining more trust. This means you can raise the delegation level! Take time to celebrate the progress!