投稿時間:2021-09-02 02:36:58 RSSフィード2021-09-02 02:00 分まとめ(37件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT 気になる、記になる… 米Microsoft、「Surface」関連の発表イベントを9月22日に開催へ https://taisy0.com/2021/09/02/144802.html surfac 2021-09-01 16:05:01
AWS AWS Architecture Blog Field Notes: How to Deploy End-to-End CI/CD in the China Regions Using AWS CodePipeline https://aws.amazon.com/blogs/architecture/field-notes-how-to-deploy-end-to-end-ci-cd-in-the-china-regions-using-aws-codepipeline/ Field Notes How to Deploy End to End CI CD in the China Regions Using AWS CodePipelineThis post was co authored by Ravi Intodia Cloud Archiect Infosys Technologies Ltd Nirmal Tomar Principal Consultant Infosys Technologies Ltd and Ashutosh Pateriya Solution Architect AWS Today s businesses must contend with fast changing competitive environments expanding security needs and scalability issues Businesses must find a way to reconcile the need for operational stability with the need for … 2021-09-01 16:46:05
AWS AWS Government, Education, and Nonprofits Blog UC Davis CWEE accelerates water conservation research with secure, compliant data storage on AWS https://aws.amazon.com/blogs/publicsector/uc-davis-cwee-accelerates-water-conservation-research-secure-compliant-data-storage-aws/ UC Davis CWEE accelerates water conservation research with secure compliant data storage on AWSTo solve some of the most pressing water and energy challenges scientists and engineers need access to robust reliable data that is often sensitive and protected Data providers researchers and host institutions need to adhere to strict requirements for protecting and securing this data The Center for Water Energy Efficiency CWEE at the University of California Davis UC Davis used AWS to create a centralized secure data repository that streamlines data sharing 2021-09-01 16:54:11
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 入力した数値の合計を自動計算をしたい https://teratail.com/questions/357303?rss=all 入力した数値の合計を自動計算をしたい前提・実現したいことここに質問の内容を詳しく書いてください。 2021-09-02 01:58:12
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) メインスレッドでの同期XMLHttpRequestは、エンドユーザーエクスペリエンスに悪影響を与えるため、非推奨です。との警告が表示されます。解決法を教えてください! https://teratail.com/questions/357302?rss=all との警告が表示されます。 2021-09-02 01:46:14
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) URLに半角スペースは使えるのか https://teratail.com/questions/357301?rss=all anbspaphp 2021-09-02 01:30:39
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Rails6 jsファイルの読み込み https://teratail.com/questions/357300?rss=all Railsjsファイルの読み込みrails初心者です。 2021-09-02 01:04:49
Azure Azureタグが付けられた新着投稿 - Qiita Azure Events Hubs に Event を送信するための便利ツール https://qiita.com/kk31108424/items/a803d9e1c4b2a14734db AzureEventsHubsにEventを送信するための便利ツールはじめにこの記事を読んでくださっている皆様は、AzureEventHubsにイベントを送信するために、何を使っていますか私は、AzureFunctionsでイベントを送信するコードを書くことが多いです。 2021-09-02 01:22:08
海外TECH DEV Community Clean Architecture on Frontend https://dev.to/bespoyasov/clean-architecture-on-frontend-4311 Clean Architecture on FrontendNot very long ago I gave a talk about the clean architecture on frontend In this post I m outlining that talk and expanding it a bit I ll put links here to all sorts of useful stuff that will come in handy as you read The source code for the application we re going to designSample of a working application What s the PlanFirst we ll talk about what the clean architecture is in general and get familiar with such concepts as domain use case and application layers Then we ll discuss how this applies to the frontend and whether it s worth it at all Next we ll design the frontend for a cookie store following the rules of the clean architecture This store will use React as its UI framework Then we ll implement one of the use cases from scratch to see if it s usable There will be a little TypeScript in the code but only to show how to use types and interfaces to describe entities Everything we ll look at today can be used without TypeScript except the code won t be as expressive We will hardly talk about OOP today so this post should not cause any severe allergies We will only mention OOP once at the end but it won t stop us from designing an application Architecture and DesignDesigning is fundamentally about taking things apart in such a way that they can be put back together Separating things into things that can be composed that s what design is ーRich Hickey Design Composition and PerformanceSystem design says the quote in the epigraph is the system separation so that it can be reassembled later And most importantly be assembled easily without too much work I agree But I consider another goal of an architecture to be the extensibility of the system The demands on the program are constantly changing We want the program to be easy to update and modify to meet new requirements The clean architecture can help achieve this goal The Clean ArchitectureThe clean architecture is a way of separating responsibilities and parts of functionality according to their proximity to the application domain By the domain we mean the part of the real world that we model with a program This is the data transformations that reflect transformations in the real world For example if we updated the name of a product replacing the old name with the new one is a domain transformation The Clean Architecture is often referred to as a three layer architecture because the functionality in it is divided into layers The original post about The Clean Architecture provides a diagram with the layers highlighted Image credits cleancoder com Domain LayerAt the center is the domain layer It is the entities and data that describe the subject area of the application as well as the code to transform that data The domain is the core that distinguishes one application from another You can think of the domain as something that won t change if we move from React to Angular or if we change some use case In the case of the store these are products orders users cart and functions to update their data The data structure of domain entities and the essence of their transformations are independent from the outer world External events trigger domain transformations but do not determine how they will occur The function of adding an item to cart doesn t care how exactly the item was added by the user himself through the “Buy button or automatically with a promo code It will in both cases accept the item and return an updated cart with the added item Application LayerAround the domain is the application layer This layer describes use cases i e user scenarios They are responsible for what happens after some event occurs For example the “Add to cart scenario is a use case It describes the actions that are should be taken after the button is clicked It s the kind of “orchestrator that says go to the server send a request now perform this a domain transformation now redraw the UI using the response data Also in the application layer theree are portsーthe specifications of how our application wants the outside world to communicate with it Usually a port is an interface a behavior contract Ports serve as a “buffer zone between our application s wishes and the reality Input Ports tell us how the application wants to be contacted by the outside world Output Ports say how the application is going to communicate with the outside world to make it ready We will look at ports in more detail later Adapters LayerThe outermost layer contains the adapters to external services Adapters are needed to turn incompatible APIs of external services into those compatible with our application s wishes Adapters are a great way to lower the coupling between our code and the code of third party services Low coupling reduces needs to change one module when others are changed Adapters are often divided into drivingーwhich send signals to our application drivenーwhich receive the signals from our application The user interacts most often with driving adapters For example the UI framework s handling of a button click is the work of a driving adapter It works with the browser API basically a third party service and converts the event into a signal that our application can understand Driven adapters interact with the infrastructure In the frontend most of the infrastructure is the backend server but sometimes we may interact with some other services directly such as a search engine Note that the farther we are from the center the more “service oriented the code functionality is the farther it is from the domain knowledge of our application This will be important later on when we decide which layer any module should belong to Dependency RuleThe three layer architecture has a dependency rule only the outer layers can depend on the inner layers This means that the domain must be independent the application layer can depend on the domain the outer layers can depend on anything Image credits herbertograca com Sometimes this rule can be violated although it is better not to abuse it For example it is sometimes convenient to use some “library like code in a domain even though there should be no dependencies We ll look at an example of this when we get to the source code An uncontrolled direction of dependencies can lead to complicated and confusing code For example breaking a dependency rule can lead to Cyclic dependencies where module A depends on B B depends on C and C depends on A Poor testability where you have to simulate the whole system to test a small part Too high coupling and as a consequence brittle interaction between modules Advantages of Clean ArchitectureNow let s talk about what this separation of code gives us It has several advantages Separate domainAll the main application functionality is isolated and collected in one placeーin the domain Functionality in the domain is independent which means that it is easier to test The less dependencies the module has the less infrastructure is needed for testing the less mocks and stubs are needed A stand alone domain is also easier to test against business expectations This helps new developers to grasp on what the application should do In addition a stand alone domain helps look for errors and inaccuracies in the “translation from the business language to the programming language more quickly Independent Use CasesApplication scenarios use cases are described separately They dictate what third party services we will need We adapt the outside world to our needs not the other way around This gives us more freedom to choose third party services For example we can quickly change the payment system if the current one starts charging too much The use case code also becomes flat testable and extensible We will see this in an example later on Replaceable Third Party ServicesExternal services become replaceable because of adapters As long as we don t change the interface it doesn t matter which external service implements the interface This way we create a barrier to change propagation changes in someone else s code do not directly affect our own Adapters also limit the propagation of bugs in the application runtime Costs of Clean ArchitectureArchitecture is first of all a tool Like any tool the clean architecture has its costs besides its benefits Takes TimeThe main cost is time It is required not only for design but also for implementation because it is always easier to call a third party service directly than to write adapters It is also difficult to think through the interaction of all the modules of the system in advance because we may not know all the requirements and constraints beforehand When designing we need to keep in mind how the system can change and leave room for expansion Sometimes Overly VerboseIn general a canonical implementation of the clean architecture is not always convenient and sometimes even harmful If the project is small a full implementation will be an overkill that will increase the entry threshold for newcomers You may need to make design tradeoffs to stay within budget or deadline I ll show you by example exactly what I mean by such tradeoffs Can Make Onboarding More DifficultFull implementation of the clean architecture can make the onboarding more difficult because any tool requires the knowledge on how to use it If you over engineer at the beginning of a project it will be harder to onboard new developers later You have to keep this in mind and keep your code simple Can Increase the Amount of CodeA problem specific for frontend is that the clean architecture can increase the amount of code in the final bundle The more code we give to the browser the more it has to download parse and interpret The amount of code will have to be watched and decisions will have to be made about where to cut corners maybe describe the use case a little simpler maybe access the domain functionality directly from the adapter bypassing the use case maybe we ll have to tweak the code splitting etc How to reduce costsYou can reduce the amount of time and code by cutting corners and sacrificing the “cleanliness of the architecture I m generally not a fan of radical approaches if it s more pragmatic e g benefits will be higher than potential costs to break a rule I ll break it So you can balk at some aspects of the clean architecture for a while with no problem at all The minimum required amount of resources however that are definitely worth devoting to are two things Extract DomainThe extracted domain helps to understand what we are designing in general and how it should work The extracted domain makes it easier for new developers to understand the application its entities and relationships between them Even if we skip the other layers it still will be easier to work and refactor with the extracted domain which is not spread over the code base Other layers can be added as needed Obey Dependency RuleThe second rule not to be discarded is the rule of dependencies or rather their direction External services must adapt to our need and never otherwise If you feel that you are fine tuning your code so that it can call the search API something is wrong Better write an adapter before the problem spreads Designing the applicationNow that we ve talked about theory we can get down to practice Let s design the architecture of a cookie store The store will sell different kinds of cookies which may have different ingredients Users will choose cookies and order them and pay for the orders in a third party payment service There will be a showcase of cookies that we can buy on the home page We will only be able to buy cookies if we are authenticated The login button will take us to a login page where we can log in After a successful login we will be able to put some cookies in the cart When we ve put the cookies in the cart we can place the order After payment we get a new order in the list and a cleared shopping cart We ll implement the checkout use case You can find the rest use cases in the source code First we ll define what kind of entities use cases and functionality in the broad sense we ll have at all Then let s decide which layer they should belong to Designing DomainThe most important thing in an application is the domain It is where the main entities of the application and their data transformations are I suggest that you start with the domain in order to accurately represent the domain knowledge of the app in your code The store domain may include the data types of each entity user cookie cart and order the factories for creating each entity or classes if you write in OOP and transformation functions for that data The transformation functions in the domain should depend only on the rules of the domain and nothing else Such functions would be for example a function for calculating the total cost user s taste preference detectiondetermining whether an item is in the shopping cart etc Designing Application LayerThe application layer contains the use cases A use case always has an actor an action and a result In the store we can distinguish A product purchase scenario payment calling third party payment systems interaction with products and orders updating browsing access to pages depending on roles Use cases are usually described in terms of the subject area For example the “checkout scenario actually consists of several steps retrieve items from the shopping cart and create a new order pay for the order notify the user if the payment fails clear the cart and show the order The use case function will be the code that describes this scenario Also in the application layer there are portsーinterfaces for communicating with the outside world Designing Adapters LayerIn the adapters layer we declare adapters to external services Adapters make incompatible APIs of third party services compatible to our system On the frontend adapters are usually the UI framework and the API server request module In our case we will use UI framework API request module Adapter for local storage Adapters and converters of API answers to the application layer Note that the more functionality is “service like the farther away it is from the center of the diagram Using MVC AnalogySometimes it s hard to know which layer some data belongs to A small and incomplete analogy with MVC may help here models are usually domain entities controllers are domain transformations and application layer view is driving adapters The concepts are different in detail but quite similar and this analogy can be used to define domain and application code Into Details DomainOnce we ve determined what entities we ll need we can start defining how they behave I ll show you the code structure in project right away For clarity I divide the code into folders layers src domain user ts product ts order ts cart ts application addToCart ts authenticate ts orderProducts ts ports ts services authAdapter ts notificationAdapter ts paymentAdapter ts storageAdapter ts api ts store tsx lib ui The domain is in the domain directory the application layer is in application and the adapters are in services We will discuss alternatives to this code structure at the end Creating Domain EntitiesWe will have modules in the domain product user order shopping cart The main actor is the user We will store data about the user in the storage during the session We want to type this data so we will create a domain user type The user type will contain ID name mail and lists of preferences and allergies domain user tsexport type UserName string export type User id UniqueId name UserName email Email preferences Ingredient allergies Ingredient Users will put cookies in the cart Let s add types for the cart and the product The item will contain ID name price in pennies and list of ingredients domain product tsexport type ProductTitle string export type Product id UniqueId title ProductTitle price PriceCents toppings Ingredient In the shopping cart we will only keep a list of the products that the user has put in it domain cart tsimport Product from product export type Cart products Product After a successful payment an new order is created Let s add an order entity type The order type will contain the user ID the list of ordered products the date and time of creation the status and the total price for the entire order domain order tsexport type OrderStatus new delivery completed export type Order user UniqueId products Product created DateTimeString status OrderStatus total PriceCents Checking Relationship Between EntitiesThe benefit of designing entity types in such a way is that we can already check whether their relationship diagram corresponds to reality We can see and check if the main actor is really a user if there is enough information in the order if some entity needs to be extended if there will be problems with extensibility in the future Also already at this stage types will help highlight errors with the compatibility of entities with each other and the direction of signals between them If everything meets our expectations we can start designing domain transformations Creating Data TransformationsAll sorts of things will happen to the data whose types we ve just designed We will be adding items to the cart clearing it updating items and user names and so on We will create separate functions for all these transformations For example to determine if a user is allergic to some ingredient or preference we can write functions hasAllergy and hasPreference domain user tsexport function hasAllergy user User ingredient Ingredient boolean return user allergies includes ingredient export function hasPreference user User ingredient Ingredient boolean return user preferences includes ingredient The functions addProduct and contains are used to add items to cart and check if an item is in cart domain cart tsexport function addProduct cart Cart product Product Cart return cart products cart products product export function contains cart Cart product Product boolean return cart products some id gt id product id We also need to calculate the total price of the list of productsーfor this we will write the function totalPrice If required we can add to this function to account for various conditions such as promo codes or seasonal discounts domain product tsexport function totalPrice products Product PriceCents return products reduce total price gt total price To allow users to create orders we will add the function createOrder It will return a new order associated with a specified user and a list of transferred products domain order tsexport function createOrder user User products Product Order return user user id products created new Date toISOString status new total totalPrice products Note that in every function we build the API so that we can comfortably transform the data We take arguments and give the result as we want At the design stage there are no external constraints yet This allows us to reflect data transformations as close to the subject domain as possible And the closer the transformations are to reality the easier it will be to check their work Detailed design Shared KernelYou may have noticed some of the types we used when describing domain types For example Email UniqueId or DateTimeString These are type alias shared kernel d tstype Email string type UniqueId string type DateTimeString string type PriceCents number I usually use type alias to get rid of primitive obsession I use DateTimeString instead of just string to make it clearer what kind of string is used The closer the type is to the subject area the easier it will be to deal with errors when they occur The specified types are in the file shared kernel d ts Shared kernel is the code and the data dependency on which doesn t increase coupling between modules More about this concept you can find in DDD Hexagonal Onion Clean CQRS How I put it all together In practice the shared kernel can be explained like this We use TypeScript we use its standard type library but we don t consider them as dependencies This is because the modules that use them may not know anything about each other and remain decoupled Not all code can be classified as shared kernel The main and most important limitation is that such code must be compatible with any part of the system If a part of the application is written in TypeScript and another part in another language the shared kernel may contain only code that can be used in both parts For example entity specifications in JSON format are fine TypeScript helpers are not In our case the entire application is written in TypeScript so type alias over built in types can also be classified as shared kernel Such globally available types do not increase coupling between modules and can be used in any part of the application Into Detail Application LayerNow that we have the domain figured out we can move on to the application layer This layer contains use cases In the code we describe the technical details of scenarios A use case is a description of what should happen to the data after adding an item to cart or proceeding to checkout Use cases involve interaction with the outer world and thus the use of external services Interactions with the outside world are side effects We know that it is easier to work with and debug functions and systems without side effects And most of our domain functions are already written as pure functions To combine clean transformations and interaction with the impure world we can use the application layer as an impure context Impure Context For Pure TransformationsAn impure context for pure transformations is a code organization in which we first perform a side effect to get some data then we do a pure transformation on that data and then do a side effect again to store or pass the result In the “Put item in cart use case this would look like first the handler would retrieve the cart state from the store then it would call the cart update function passing the item to be added and then it would save the updated cart in the storage The whole process is a “sandwich side effect pure function side effect The main logic is reflected in data transformation and all communication with the world is isolated in an imperative shell Impure context is sometimes called a functional core in an imperative shell Mark Seemann wrote about this in his blog This is the approach we will use when writing use case functions Designing Use CaseWe will select and design the checkout use case It is the most representative one because it is asynchronous and interacts with a lot of third party services The rest of the scenarios and the code of the whole application you can find on GitHub Let s think about what we want to achieve in this use case The user has a cart with cookies when the user clicks the checkout button we want to create a new order pay for it in a third party payment system if the payment failed notify the user about it if it passed save the order on the server add the order to the local data store to show on the screen In terms of API and function signature we want to pass the user and the cart as arguments and have the function do everything else by itself type OrderProducts user User cart Cart gt Promise lt void gt Ideally of course the use case should not take two separate arguments but a command that will encapsulate all the input data inside itself But we don t want to bloat the amount of code so we ll leave it that way Writing Application Layer PortsLet s take a closer look at the steps of the use case the order creation itself is a domain function Everything else is external services that we want to use It s important to remember that it s the external services that have to adapt to our needs and not otherwise So in the application layer we ll describe not only the use case itself but also the interfaces to these external servicesーthe ports The ports should be first of all convenient for our application If the API of external services isn t compatible with our needs we ll write an adapter Let s think of the services we will need a payment system a service to notify users about events and errors a service to save data to the local storage Note that we are now talking about the interfaces of these services not their implementation At this stage it is important for us to describe the required behavior because this is the behavior we will rely on in the application layer when describing the scenario How exactly this behavior will be implemented is not important yet This allows us to postpone the decision about which external services to use until the very last momentーthis makes the code minimally coupled We ll deal with the implementation later Also note that we split the interfaces by features Everything payment related is in one module storage related in another This way it will be easier to ensure that the functionality of different third party services are not mixed up Payment System InterfaceThe cookie store is a sample application so the payment system will be very simple It will have a tryPay method which will accept the amount of money that needs to be paid and in response will send a confirmation that everything is OK application ports tsexport interface PaymentService tryPay amount PriceCents Promise lt boolean gt We won t handle errors because error handling is a topic for a whole separate big post Yes usually the payment is done on the server but this is a sample example let s do everything on the client We could easily communicate with our API instead of directly with the payment system This change by the way would only affect this use case the rest of the code would remain untouched Notification Service InterfaceIf something goes wrong we have to tell the user about it The user can be notified in different ways We can use the UI we can send letters we can user s phone to vibrate please don t In general the notification service would also be better to be abstract so that now we don t have to think about the implementation Let it take a message and somehow notify the user application ports tsexport interface NotificationService notify message string void Local Storage InterfaceWe will save the new order in a local repository This storage can be anything Redux MobX whatever floats your boat js The repository can be divided into micro stores for different entities or be one big repository for all the application data It s not important right now either because these are implementation details I like to divide the storage interfaces into separate ones for each entity A separate interface for the user data store a separate one for the shopping cart a separate one for the order store application ports tsexport interface OrdersStorageService orders Order updateOrders orders Order void In the example here I make only the order store interface all the rest you can see in source code Use Case FunctionLet s see if we can build the use case using the created interfaces and the existing domain functionality As we described earlier the script will consist of the following steps verify the data create an order pay for the order notify about problems save the result First let s declare the stubs of the services we re going to use TypeScript will swear that we haven t implemented the interfaces in the appropriate variables but for now it doesn t matter application orderProducts tsconst payment PaymentService const notifier NotificationService const orderStorage OrdersStorageService We can now use these stubs as if they were real services We can access their fields call their methods This comes in handy when “translating a use case from the business language to software language Now create a function called orderProducts Inside the first thing we do is create a new order application orderProducts ts async function orderProducts user User cart Cart const order createOrder user cart products Here we take advantage of the fact that the interface is a contract for behavior This means that in the future the stubs will actually perform the actions we now expect application orderProducts ts async function orderProducts user User cart Cart const order createOrder user cart products Try to pay for the order Notify the user if something is wrong const paid await payment tryPay order total if paid return notifier notify Oops Save the result and clear the cart const orders orderStorage orderStorage updateOrders orders order cartStorage emptyCart Note that the use case does not call third party services directly It relies on the behavior described in the interfaces so as long as the interface remains the same we don t care which module implements it and how This makes the modules replaceable Into Detail Adapters LayerWe have “translated the use case into TypeScript Now we have to check if the reality matches our needs Usually it doesn t So we tweak the outside world to suit our needs with adapters Binding UI and UsecaseThe first adapter is a UI framework It connects the native browser API with the application In the case of the order creation it is the “Checkout button and the click handler which will launch the use case function ui components Buy tsxexport function Buy Get access to the use case in the component const orderProducts useOrderProducts async function handleSubmit e React FormEvent setLoading true e preventDefault Call the use case function await orderProducts user cart setLoading false return lt section gt lt h gt Checkout lt h gt lt form onSubmit handleSubmit gt lt form gt lt section gt Let s provide the use case through a hook We ll get all the services inside and as a result we ll return the use case function itself from the hook application orderProducts tsexport function useOrderProducts const notifier useNotifier const payment usePayment const orderStorage useOrdersStorage async function orderProducts user User cookies Cookie … return orderProducts We use hooks as a “crooked dependency injection First we use the hooks useNotifier usePayment useOrdersStorage to get the service instances and then we use closure of the useOrderProducts function to make them available inside the orderProducts function It s important to note that the use case function is still separated from the rest of the code which is important for testing We ll pull it out completely and make it even more testable at the end of the article when we do the review and refactoring Payment Service ImplementationThe use case uses the PaymentService interface Let s implement it For payment we will use the fake API stub Again we are not forced to write the whole service now we can write it later the main thingーto implement the specified behavior services paymentAdapter tsimport fakeApi from api import PaymentService from application ports export function usePayment PaymentService return tryPay amount PriceCents return fakeApi true The fakeApi function is a timeout which is triggered after ms simulating a delayed response from the server It returns what we pass to it as an argument services api tsexport function fakeApi lt TResponse gt response TResponse Promise lt TResponse gt return new Promise res gt setTimeout gt res response We explicitly type the return value of usePayment This way TypeScript will check that the function actually returns an object that contains all the methods declared in the interface Notification Service ImplementationLet the notifications be a simple alert Since the code is decoupled it won t be a problem to rewrite this service later services notificationAdapter tsimport NotificationService from application ports export function useNotifier NotificationService return notify message string gt window alert message Local Storage ImplementationLet the local storage be React Context and hooks We create a new context pass the value to provider export the provider and access the store via hooks store tsxconst StoreContext React createContext lt any gt export const useStore gt useContext StoreContext export const Provider React FC children gt Other entities const orders setOrders useState const value orders updateOrders setOrders return lt StoreContext Provider value value gt children lt StoreContext Provider gt We will write a hook for for each feature This way we won t break ISP and the stores at least in terms of interfaces they will be atomic services storageAdapter tsexport function useOrdersStorage OrdersStorageService return useStore Also this approach will give us the ability to customize additional optimizations for each store we can create selectors memoization and more Validate Data Flow DiagramLet s now validate how the user will communicate with the application during the created use case The user interacts with the UI layer which can only access the application through ports That is we can change the UI if we want to Use cases are handled in the application layer which tells us exactly what external services are required All the main logic and data is in the domain All external services are hidden in the infrastructure and are subject to our specifications If we need to change the service of sending messages the only thing we will have to fix in the code is an adapter for the new service This scheme makes the code replaceable testable and extensible to changing requirements What Can Be ImprovedAll in all this is enough to get you started and gain an initial understanding of the clean architecture But I want to point out things that I have simplified to make the example easier This section is optional but it will give an expanded understanding of what clean architecture “with no cut corners might look like I would highlight a few things that can be done Use Object Instead of Number For the PriceYou may have noticed that I use a number to describe the price This is not a good practice shared kernel d tstype PriceCents number A number only indicates the quantity but not the currency and a price without currency is meaningless Ideally price should be made as an object with two fields value and currency type Currency RUB USD EUR SEK type AmountCents number type Price value AmountCents currency Currency This will solve the problem of storing currencies and save a lot of effort and nerves when changing or adding currencies to the store I didn t use this type in the examples so as not to complicate it In the real code however the price would be more similar to this type Separately it s worth mentioning the value of the price I always keep the amount of money in the smallest fraction of the currency in circulation For example for the dollar it is cents Displaying the price in this way allows me not to think about division and fractional values With money this is especially important if we want to avoid problems with floating point math Split Code by Features not LayersThe code can be split in folders not “by layers but “by features One feature would be a piece of the pie from the schematic below This structure is even more preferable because it allows you to deploy certain features separately which is often useful Image credits herbertograca com I recommend reading about it in DDD Hexagonal Onion Clean CQRS How I put it all together I also suggest to look at Feature Sliced which is conceptually very similar to component code division but easier to understand Pay Attention to Cross Component UsageIf we re talking about splitting system into components it s worth mentioning the cross component use of code as well Let s remember the order creation function import Product totalPrice from product export function createOrder user User products Product Order return user user id products created new Date toISOString status new total totalPrice products This function uses totalPrice from another componentーthe product Such usage is fine by itself but if we want to divide the code into independent features we can t directly access the functionality of the other feature You can also see a way around this restriction in DDD Hexagonal Onion Clean CQRS How I put it all together and Feature Sliced Use Branded Types not AliasesFor the shared kernel I used type aliases They are easy to operate with you just have to create a new type and reference e g a string But their disadvantage is that TypeScript has no mechanism to monitor their use and enforce it This doesn t seem to be a problem so someone uses string instead of DateTimeStringーso what The code will compile The problem is exactly that the code will compile even though a broader type is used in clever words precondition is weakened This first of all makes the code more fragile because it allows you to use any strings not just strings of special quality which can lead to errors Secondly it s confusing to read because it creates two sources of truth It s unclear if you really only need to use the date there or if you can basically use any string There is a way to make TypeScript understand that we want a particular typeーuse branding branded types Branding enables to keep track of exactly how types are used but makes the code a little more complicated Pay Attention to Possible Dependency in DomainThe next thing that stings is the creation of a date in the domain in the createOrder function import Product totalPrice from product export function createOrder user User products Product Order return user user id products Вотэтастрока created new Date toISOString status new total totalPrice products We can suspect that new Date toISOString will be repeated quite often in the project and would like to put it in some kind of a helper lib datetime tsexport function currentDatetime DateTimeString return new Date toISOString And then use it in the domain domain order tsimport currentDatetime from lib datetime import Product totalPrice from product export function createOrder user User products Product Order return user user id products created currentDatetime status new total totalPrice products But we immediately remember that we can t depend on anything in the domainーso what should we do It s a good idea that createOrder should take all the data for the order in a complete form The date can be passed as the last argument domain order tsexport function createOrder user User products Product created DateTimeString Order return user user id products created status new total totalPrice products This also allows us not to break the dependency rule in cases where creating a date depends on libraries If we create a date outside a domain function it is likely that the date will be created inside the use case and passed as an argument function someUserCase Use the dateTimeSource adapter to get the current date in the desired format const createdOn dateTimeSource currentDatetime Pass already created date to the domain function createOrder user products createdOn This will keep the domain independent and also make it easier to test In the examples I chose not to focus on this for two reasons it would distract from the main point and I see nothing wrong with depending on your own helper if it uses only language features Such helpers can even be considered as the shared kernel because they only reduce code duplication Make the user case more testableThe use case has a lot to discuss as well Right now the orderProducts function is hard to test in isolation from Reactーthat s bad Ideally it should be possible to test it with minimal effort The problem with the current implementation is the hook that provides use case access to the UI application orderProducts tsexport function useOrderProducts const notifier useNotifier const payment usePayment const orderStorage useOrdersStorage const cartStorage useCartStorage async function orderProducts user User cart Cart const order createOrder user cart products const paid await payment tryPay order total if paid return notifier notify Oops const orders orderStorage orderStorage updateOrders orders order cartStorage emptyCart return orderProducts In a canonical implementation the use case function would be located outside the hook and the services would be passed to the use case via the last argument or via a DI type Dependencies notifier NotificationService payment PaymentService orderStorage OrderStorageService async function orderProducts user User cart Cart dependencies Dependencies defaultDependencies const notifier payment orderStorage dependencies The hook would then become an adapter function useOrderProducts const notifier useNotifier const payment usePayment const orderStorage useOrdersStorage return user User cart Cart gt orderProducts user cart notifier payment orderStorage Then the hook code could be considered an adapter and only the use case would remain in the application layer The orderProducts function could be tested by passing the required service mochas as dependencies Configure Automatic Dependency InjectionThere in the application layer we now inject services by hand export function useOrderProducts Here we use hooks to get the instances of each service which will be used inside the orderProducts use case const notifier useNotifier const payment usePayment const orderStorage useOrdersStorage const cartStorage useCartStorage async function orderProducts user User cart Cart Inside the use case we use those services return orderProducts But in general this can be automated and done with dependency injection We already looked at the simplest version of injection through the last argument but you can go further and configure automatic injection In this particular application I didn t think it made much sense to set up a DI It would distract from the point and overcomplicate the code And in the case of React and hooks we can use them as a “container that returns an implementation of the specified interface Yes it s manual work but it doesn t increase the entry threshold and is quicker to read for new developers What in real projects could be more complicatedThe example in the post is refined and intentionally simple It is clear that life is much more surprising and complicated than this example So I also want to talk about common problems that can arise when working with the clean architecture Branching Business LogicThe most important problem is the subject area that we lack knowledge about Imagine a store has a product a discounted product and a write off product How do we properly describe these entities Should there be a “base entity that will be expanded How exactly should this entity be expanded Should there be additional fields Should these entities be mutually exclusive How should user cases behave if there s another entity instead of a simple one Should the duplication be reduced immediately There may be too many questions and too many answers because neither the team nor the stakeholders know yet how the system should actually behave If there are only assumptions you can find yourself in an analysis paralysis Specific solutions depend on the specific situation I can only recommend a few general things Don t use inheritance even if it s called “extension Even if it looks like the interface is really inherited Even if it looks like “well there s clearly a hierarchy here Just wait Copypaste in code is not always evil it s a tool Make two almost identical entities see how they behave in reality observe them At some point you ll notice that they ve either become very different or they really only differ in one field It s easier to merge two similar entities into one than it is to create checks for every possible condition and variant If you still have to extend something Remember covariance contravariance and invariance so you don t accidentally come up with more work than you should Use the analogy with blocks and modifiers from BEM when choosing between different entities and extensions It helps me a lot to determine if I have a separate entity or a “modifier extension the code if I think of it in the context of BEM Interdependent Use CasesThe second big problem is related use cases where an event from one use case triggers another The only way to handle this which I know and which helps me is to break up the use cases into smaller atomic use cases They will be easier to put together In general the problem with such scripts is a consequence of another big problem in programming entities composition There s a lot already written about how to efficiently compose entities and there s even a whole mathematics section We won t go far there that s a topic for a separate post ConclusionsIn this post I ve outlined and expanded a bit on my talk on the clean architecture on the frontend It s not a gold standard but rather a compilation of experience with different projects paradigms and languages I find it a convenient scheme that allows you to decouple code and make independent layers modules services which not only can be deployed and published separately but also transferred from project to project if needed We haven t touched on OOP because architecture and OOP are orthogonal Yes architecture talks about entity composition but it doesn t dictate what should be the unit of composition object or function You can work with this in different paradigms as we ve seen in the examples As for OOP I recently wrote a post about how to use the clean architecture with OOP In this post we write a tree picture generator on canvas To see how exactly you can combine this approach with other stuff like chip slicing hexagonal architecture CQS and other stuff I recommend reading DDD Hexagonal Onion Clean CQRS How I put it all together and the whole series of articles from this blog Very insightful concise and to the point SourcesTalk and sources from it The source code for the application we re going to designSample of a working applicationDesign in Practice Model View ControllerDDD Hexagonal Onion Clean CQRS …How I put it all togetherPorts amp Adapters ArchitectureMore than Concentric LayersGenerating Trees Using L Systems TypeScript and OOP Series ArticlesSystem design Domain KnowledgeUse CaseCoupling and cohesionShared KernelAnalysis ParalysisBooks about design and coding Design Composition and PerformanceClean ArchitecturePatterns for Fault Tolerant SoftwareConcepts from TypeScript C and other languages InterfaceClosureSet TheoryType AliasesPrimitive ObsessionFloating Point MathBranded Types иHow to Use ItPatterns methodologies Adapter patternSOLID PrinciplesImpureim SandwichDesign by ContractCovariance and contravarianceLaw of DemeterBEM Methodology 2021-09-01 16:40:11
海外TECH DEV Community How to download CSV and JSON files in React https://dev.to/thomasfindlay/how-to-download-csv-and-json-files-in-react-18m6 How to download CSV and JSON files in ReactThis article was originally published on The Road To Enterprise blog Read it there for the best reading experience There are websites that let users download CSV or JSON data as a file This functionality can be quite useful as users can download the data for further processing or to share it In this article you will learn how to add the functionality that will allow users to export a table in React and download it in JSON and CSV formats You can find the full code example in the GitHub repo Project SetupFirst let s create a new React project using Vite npm init vite latest csv json files download template reactAfter the project is created cd into it to install dependencies by running npm install and then start the dev server with npm run dev Next we need to modify the App jsx and App css files src App jsximport React from react function App return lt div className App gt lt h gt How to download CSV and JSON files in React lt h gt lt div gt export default Appsrc App css App max width rem margin rem auto That s enough for the initial setup Let s start by adding functionality to export to JSON Export to JSONLet s start by creating a file with users data that will be used for downloading a file and rendering a table src users json users id name Caitlyn surname Kerluke age id name Rowan surname Nikolaus age id name Kassandra surname Haley age id name Rusty surname Arne age Next we need to update the App component to utilise the users data and display it in a table Besides that we will add a button to trigger the download Below you can see the code for the App jsx component Besides the component we have two functions exportToJson and downloadFile The former one calls the latter with appropriate arguments The downloadFile function accepts an object as a parameter and expects three properties datafileNamefileTypeThe data and fileType are used to create a blob that is downloaded After that we create an anchor element and dispatch a click event on it src App jsximport React from react import App css import usersData from users json const downloadFile data fileName fileType gt Create a blob with the data we want to download as a file const blob new Blob data type fileType Create an anchor element and dispatch a click event on it to trigger a download const a document createElement a a download fileName a href window URL createObjectURL blob const clickEvt new MouseEvent click view window bubbles true cancelable true a dispatchEvent clickEvt a remove const exportToJson e gt e preventDefault downloadFile data JSON stringify usersData users fileName users json fileType text json function App return lt div className App gt lt h gt How to download CSV and JSON files in React lt h gt lt table className usersTable gt lt thead gt lt tr gt lt th gt ID lt th gt lt th gt Name lt th gt lt th gt Surname lt th gt lt th gt Age lt th gt lt tr gt lt thead gt lt tbody gt usersData users map user gt const id name surname age user return lt tr key id gt lt td gt id lt td gt lt td gt name lt td gt lt td gt surname lt td gt lt td gt age lt td gt lt tr gt lt tbody gt lt table gt lt div className actionBtns gt lt button type button onClick exportToJson gt Export to JSON lt button gt lt div gt lt div gt export default AppWe can add a few styles so the table looks a bit nicer src App css App max width rem margin rem auto usersTable th usersTable td padding rem rem text align left actionBtns margin top rem actionBtns button button margin left rem Great now you should be able to download the users data as a JSON file by clicking on the Export to JSON button Next we will add Export to CSV functionality Export to CSVWe need another button that will be used to export data to a CSV file Besides that we also need a handler for it The usersData is in the JSON format so we will need to convert it to the CSV format before passing it to the downloadFile function src App jsximport React from react import App css import usersData from users json const downloadFile data fileName fileType gt const blob new Blob data type fileType const a document createElement a a download fileName a href window URL createObjectURL blob const clickEvt new MouseEvent click view window bubbles true cancelable true a dispatchEvent clickEvt a remove const exportToJson e gt e preventDefault downloadFile data JSON stringify usersData users fileName users json fileType text json const exportToCsv e gt e preventDefault Headers for each column let headers Id Name Surname Age Convert users data to a csv let usersCsv usersData users reduce acc user gt const id name surname age user acc push id name surname age join return acc downloadFile data headers usersCsv join n fileName users csv fileType text csv function App return lt div className App gt lt h gt How to download CSV and JSON files in React lt h gt lt table className usersTable gt lt thead gt lt tr gt lt th gt ID lt th gt lt th gt Name lt th gt lt th gt Surname lt th gt lt th gt Age lt th gt lt tr gt lt thead gt lt tbody gt usersData users map user gt const id name surname age user return lt tr key id gt lt td gt id lt td gt lt td gt name lt td gt lt td gt surname lt td gt lt td gt age lt td gt lt tr gt lt tbody gt lt table gt lt div className actionBtns gt lt button type button onClick exportToJson gt Export to JSON lt button gt lt button type button onClick exportToCsv gt Export to CSV lt button gt lt div gt lt div gt export default App Wrap upThere we have it I hope you enjoyed this article Now you should be well equipped with knowledge on how to add download files functionality to your own projects Remember that even though I used React to demonstrate the download examples you can use the download logic in other frameworks like Vue Svelte or Angular Want to stay up to date and learn more programming tips Make sure to follow me on Twitter and subscribe to the newsletter 2021-09-01 16:30:09
海外TECH DEV Community For Myself: Explaining Actions https://dev.to/am20dipi/for-myself-explaining-actions-4f8d For Myself Explaining Actions Actions for My Bookmark ResourceToday I will be explaining my actions bookmarks js file of my React Redux frontend application I utilize actions to portray CRUD functionality Fetch requests to my Rails API backend and the resolving or rejecting of Fetch Promises ️This is really for myself but if you want to read along then come join me ️ ActionsActions are JavaScript objects that tell us how to and or what we want to change to the state Since it is a JavaScript object an action will have key value pairs as properties Specifically for an action to do its job it must have a type property and a payload property The payload property can go by any name such as person or data A simple example of an action object is const addTodo type ADD TODO payload Buy milk We have our action object addTodo and it has a type property of ADD TODO and a payload property of Buy milk It clearly describes how and what it wants to change to the state the action wants to add a todo with the data Buy milk Although this is a simple example actions can get very complex For example an action might be a nested object const addTodo type ADD TODO payload todo name Buy milk category Groceries completed false We have a payload object inside an action object This can continue for many levels as we know that data reflects the complexity of an application As complexity ensues Redux introduced the concept of action creators Action creators are JS functions that return an action object Its primary purpose is to bind our action object to dispatch Dispatch takes in an action object and passes it to the reducer to invoke the reducer to make the change and return the new state By binding our action to dispatch we can ultimately connect or bridge our actions to our reducers to make the change I used action creators in my actions bookmarks js file to connect to the reducers and to ensure the ability to make fetch requests to my Rails API backend ️ ️Let s take a look at some code ️ ️ actions bookmarks jsimport CREATE BOOKMARK GET BOOKMARKS DELETE BOOKMARK FAVORITE BOOKMARK ERROR LOADING BOOKMARKS UPDATE QUERY from types import getToken from users actions users jsexport function getToken return localStorage getItem token Above I import my action types from a types folder I built to store them all As we now know an action type is the first key value pair of an action object and essential to an action s purpose I also import a function getToken from my actions users js file because I have Devise JWT Authentication I listed the function above as well just for reference export function createBookmark data return dispatch gt dispatch type LOADING BOOKMARKS fetch http localhost bookmarks method post headers Content Type application json Authorization getToken body JSON stringify data then response gt if response ok response json then json gt dispatch type CREATE BOOKMARK payload json else return response json then json gt return Promise reject json catch error gt dispatch type ERROR payload error My first action creator is a function called createBookmark It takes in an argument of data which reflects the input from the bookmark form on the frontend I initiate a return statement that passes in dispatch as to be used with action objects within my return statement I first dispatch an action of LOADING BOOKMARKS This tells me that my Redux store is loading the current bookmarks of my current user and then I can see the action occur in my Redux devTools This is a point of organization for me it lets me know what is occurring in the store I then dispatch a fetch request to localhost bookmarks Since I am creating a bookmark I need to post my fetch data to bookmarks as if my Promise is resolved the new bookmark will be added to the bookmarks object in my backend Within fetch I use a post method to tell my request I am adding something I use headers to accept a content type of JSON since my backend bookmarks object is serialized and written in JSON My second header Authorization getToken touches upon my user authentication I use the imported function getToken to say I want to associate this created bookmark with my current user reflected by the token To finish my fetch request I use JSON stringify method to convert a JavaScript object or value to a JSON string and I pass it the data I utilize a series of Promise instance methods then to check if the response is ok and if the Promise is resolved If so I take the JSON from the response and use it as my payload key s value to be dispatched to my action object CREATE BOOKMARK If the response is not ok the Promise is rejected A Note on Promises A Promise is begins as pending and its result value is undefined A fulfilled Promise is resolved and results in a value the payload and a successful callback Meanwhile a rejected or failed Promise results in an error which is usually a failure callback These three Promise statuses fulfilled pending and rejected determine the behavior and the result of the fetch request Only if the Promise is reject is the catch instance method invoked and dispatches an action object of ERROR Let s take a look at another action creator export function favoriteBookmark id favorite return dispatch getState gt const bookmark getState bookmarks bookmarks find bookmark gt bookmark id id const data headline bookmark headline web url bookmark web url description bookmark description id id favorite favorite const configObject method PATCH headers Content Type application json Accepts application json Authorization getToken body JSON stringify data fetch http localhost bookmarks id configObject then response gt if response ok response json then json gt dispatch type FAVORITE BOOKMARK payload json else return response json then json gt return Promise reject json catch error gt dispatch type ERROR payload error This action creator favoriteBookmark takes in two arguments id and favorite I initiate a return statement with two arguments as well dispatch and getState We learned about dispatch already so what is getState getState is a function given to us from the Redux store It returns the current state of my application Using getState I search through current state of the my bookmarks data and use a find method to check if the id I passed into our action creator matches the id of the bookmark I am trying to favorite I set this value to a constant bookmark I declare and assign another constant data to the attributes of the bookmark I am trying to favorite As the headline web url and description attributes of my bookmark will not be changed I set them to their current value I assign the attributes id and favorite to the params I passed into our action creator I optionally created another constant configObject to declare my method PATCH as I am updating an already existing bookmark my headers including Authorization and my body which I pass my data constant to be stringified into a JSON string from a JSON object I pass my configObject into my fetch request and specify the id attribute of the bookmark I am trying to favorite in my localhost endpoint Similarly to my createBookmark action creator I check if the response is ok and dispatch my action object with a payload of json If my response is not ok my Promise is rejected and I dispatch an ERROR action object in my catch instance method Again this is just for my own amusement studying Yet if you do find yourself reading over this and you would like to suggest something ask a question or continue the discussion please feel free 2021-09-01 16:25:35
海外TECH DEV Community Responsive Social Media Card Built With React | Part One https://dev.to/hyggedev/responsive-social-media-card-built-with-react-part-one-ckj Responsive Social Media Card Built With React Part OneHey devs I am starting a small React amp styled components UI series and this project will act as its introduction I have set a goal for myself to create at least small react projects utilizing styled components and they ll all be available via CodeSandBox So no excuses here we go Preface and IntroductionAs I am hoping to reach as many beginner to Jr level web developers as possible for the sake of time and simplicity this won t be a step by step tutorial nor just a Github repo Instead I will share my codesandbox so you can immediately look and tinker with the code This hopefully removes any barrier to entry for beginners who have not yet made the jump to Github As a selfish bonus this also allows me to quickly prototype ideas and get new projects added to the series I sincerely hope you guys dig it DEMOCodeSandBox io The Project ️ Hit me up ️If you end up loving codesandbox and you made an account hit me up on Twitter to link up and we can collab go over any code that may need clarifying or just shoot the shit Either way Happy coding ️ Related posts also written by me Filter Your React Data With Basic Javascript Chris Hansen・Aug ・ min read webdev react tutorial beginners How to build a Responsive React Navigation Menu with Styled Components Chris Hansen・Aug ・ min read webdev beginners javascript react No Fuss Dark Mode Toggle with React amp Styled Components ️ Chris Hansen・Aug ・ min read webdev beginners react javascript Easiest Way To Add Icons To Your React Apps Chris Hansen・Aug ・ min read webdev beginners javascript react 2021-09-01 16:17:38
海外TECH DEV Community Mitigating Conflicts In Pull Requests https://dev.to/reviewpad/mitigating-conflicts-in-pull-requests-35g2 Mitigating Conflicts In Pull RequestsOne of the most annoying tasks for a developer is to fix git conflicts You open a pull request ace the code review process all checks are passing and when you go for that merge button you find out that it is blocked because of git conflicts Wouldn t it be nice if you could avoid this situation Developers that use a git flow branching model rely on way merge tools like git merge or kdiff to automatically merge their changes Unfortunately these tools are unable to resolve all concurrent changes made to files in the branches involved in the merge As developers we experience these unresolved concurrent changes as git merge conflicts As the name suggests the existence of a git merge conflict prevents the merge action The exact definition of a git merge conflict depends on the algorithm used to compute the merge commit The most widely used algorithms are textual in nature a conflict in a file means that the branches involved in the merge have both made modifications to the same line in a file Nowadays there are much more sophisticated algorithms to compute merge commits than what is offered in GitHub Gitlab or Bitbucket For an overview check out the article Verified Three Way Program Merge we do plan to incorporate some of them soon into Reviewpad However a merge is and always will be a sensitive operation That is some concurrent changes really do conflict and require human intervention The reality is that git merge conflicts are relatively common in highly collaborative teams There are currently pull requests blocked in the google guava project because of git conflicts While some conflicts are unavoidable it is possible to create awareness of their future existence so that you can mitigate their effects Reviewpad s Concurrent Pull Request AnalysisAt Reviewpad we believe that git conflicts are being discovered at a very late stage in the review process That is very annoying because sometimes after you have gone through the entire review process you find out that a recently merged PR just introduced git conflicts Now you need to restart the entire process So to reduce this effort we have built into Reviewpad a concurrent pull request analysis that provides information about future git conflicts Information about conflicting changes with ongoing reviews at google guava Remove redundant bit masking The way Reviewpad keeps track of potential future git conflicts is by checking if modified files in a particular pull request are also modified in other open pull requests that share the base branch We have been using this check in two use cases that improve the review process Improve reviewer selectionFinding the right reviewer can be difficult at times in highly collaborative projects Who better to review than a developer who is also changing the same parts of the code or a reviewer of such PR Example of pull request without reviewers that has conflicts with concurrent PRs In the video we can see that there is another open PR that is also changing the ci yml The author of that pull request could be a great candidate to review this pull request Ideally both developers could collaborate so that all conflicts could be avoided once one of the PRs is merged Improve merge strategyAs we mentioned in the beginning of this article there is nothing more annoying than a pull request that is ready to merge but will be blocked by the merge of another PR Although we can t completely avoid this situation we have integrated this check into Reviewpad s Release Board so that it becomes evident In this first version we have decided to restrict this information to pull requests that are ready to merge Here s what a PR card with conflicts in concurrent PRs looks like Pull request card that is ready to merge and that has conflicts with another PR that is also ready to merge In the following video we go over the simple flow of approving a PR seeing the conflicts in the Ready to Merge column and also the effect of merging this PR which moves the conflicting PR back to the Git conflicts column Integration of concurrent PR check with Review Board in the Ready to Merge column Cool How do I check this out by myself We have a public beta version of Reviewpad available at reviewpad com get started You will need to create a new account and once you log in for the first time you will see the following page to connect to a code host Connect to code host page on Reviewpad You can connect to GitHub through our OAuth app or manually add a personal access token The OAuth requires minimal scopes to be able to read and comment on public repositories And voilà you are ready to get started with Reviewpad We are just getting started with incorporating features that improve the merge experience in pull requests Feel free to reach us on our community Slack with requests 2021-09-01 16:13:13
海外TECH DEV Community Find out what's new in my portfolio website https://dev.to/m_ahmad/find-out-what-s-new-in-my-portfolio-website-1il7 Find out what x s new in my portfolio websiteI want to share new updated version of my portfolio website Here is the list of new features and changes that I made in my portfolio website Color Mode Switcher for links and tagsSearch feature for articlesUpdated website color mode switcher icons and added animationFixed outline issue of links and buttonsWebsite link ma ahmadGithub repo 2021-09-01 16:04:56
Apple AppleInsider - Frontpage News Google making its own Chromebook CPUs inspired by Apple's M1 https://appleinsider.com/articles/21/09/01/google-making-its-own-chromebook-cpus-inspired-by-apples-m1?utm_medium=rss Google making its own Chromebook CPUs inspired by Apple x s MFuture versions of the Chromebook laptop are to be powered by processors designed by Google itself in a move reportedly inspired by the success of Apple Silicon ChromebookGoogle s Chromebook has been a clear rival to Apple especially in education Now with some schools switching from Chromebook to iPad and as global demand has slowed the company plans to design its own Chromebook CPUs Read more 2021-09-01 16:59:52
Apple AppleInsider - Frontpage News September's best deals on Amazon deliver $99 Apple Pencil 2, $100 off M1 iPad Pro, more https://appleinsider.com/articles/21/09/01/septembers-best-deals-on-amazon-deliver-99-apple-pencil-2-100-off-m1-ipad-pro-more?utm_medium=rss September x s best deals on Amazon deliver Apple Pencil off M iPad Pro moreFresh Apple deals are in effect at Amazon this September with double digit and triple digit savings on M MacBooks the latest iPad Pro AirPods Apple TVs and even the Apple Pencil Apple Pencil back on sale for Matching the lowest price we ve seen Amazon has the nd Generation Apple Pencil on sale for with units in stock and ready to ship Compatible with the latest M iPad Pro and the th Generation iPad Air the stylus is a handy assistant for students artists and business professionals alike Read more 2021-09-01 16:34:29
Apple AppleInsider - Frontpage News Extended: $199 Babbel lifetime subscription is back, save $300 https://appleinsider.com/articles/21/08/15/199-babbel-lifetime-subscription-is-back-save-300-with-access-to-14-languages?utm_medium=rss Extended Babbel lifetime subscription is back save Extended by popular demand For a limited time only save on a lifetime Babbel subscription with access to languages updates included The discount drives the price down to Babbel Lifetime SubscriptionThe Babbel deal includes lifetime access to learn languages including Spanish German Italian and French Read more 2021-09-01 16:19:10
Apple AppleInsider - Frontpage News Best Deals September 1 - $490 i7 MacBook Air, eBay Labor Day 15% off, and more! https://appleinsider.com/articles/21/09/01/best-deals-september-1---490-i7-macbook-air-ebay-labor-day-15-off-and-more?utm_medium=rss Best Deals September i MacBook Air eBay Labor Day off and more Wednesday s best deals include a i MacBook Air off Crucial laptop RAM more than off LG inch UltraWide monitor eBay Labor Day OFF and more Deals Wednesday September Shopping online for the best discounts and deals can be an annoying and challenging task So rather than sifting through miles of advertisements check out this list of sales we ve hand picked just for the AppleInsider audience Read more 2021-09-01 16:10:24
Apple AppleInsider - Frontpage News Backblaze partners with Vultr cloud, launches Amazon AWS rival https://appleinsider.com/articles/21/09/01/backblaze-partners-with-vultr-cloud-launches-amazon-aws-rival?utm_medium=rss Backblaze partners with Vultr cloud launches Amazon AWS rivalBackup company Backblaze has launched a cloud computing service with Vultr intending to provide developers with a lower cost alternative to Amazon s S and EC web services Backblaze has partnered with Vultr to offer cloud computingThrough the new service Backblaze and Vultr users can run applications with virtualized cloud compute and bare metal resources The companies say that their new service is simpler to use and addresses the typically disproportionately huge bandwidth costs that smaller companies face Read more 2021-09-01 16:02:19
海外TECH Engadget Twitter tests new harassment prevention feature with ‘Safety Mode’ https://www.engadget.com/twitter-tests-safety-mode-164638754.html?src=rss Twitter tests new harassment prevention feature with Safety Mode Twitter is experimenting with its most aggressive anti harassment features to date The company will start testing “Safety Mode a new account setting that automatically blocks accounts using “potentially harmful language Twitter first previewed the feature back in February during its Analyst Day presentation but is now starting to make it available to “a small feedback group It s not clear when it might be available more widely When enabled Safety Mode will proactively block accounts that are likely to be the source of harassment for a period of seven days Twitter says the system is designed so that accounts of people you know or frequently interact with won t be blocked but trolls will “Safety Mode is a feature that temporarily blocks accounts for seven days for using potentially harmful language ーsuch as insults or hateful remarks ーor sending repetitive and uninvited replies or mentions Twitter writes in a blog post “When the feature is turned on in your Settings our systems will assess the likelihood of a negative engagement by considering both the Tweet s content and the relationship between the Tweet author and replier Introducing Safety Mode A new way to limit unwelcome interactions on Twitter pic twitter com xaOtTVhFーTwitter Safety TwitterSafety September While Twitter has taken several steps in the past to address its long running harassment problem Safety Mode is notable because it takes more of the burden off of the person being harassed Instead of manually blocking muting and reporting problematic accounts the feature should be able to catch the offending tweets before they are seen Because it s still in a relatively early stage Twitter says it s likely to make at least some mistakes And users are able to manually review the tweets and accounts flagged by Safety Mode and reverse faulty autoblocks When the seven day period ends users will get a notification quot recapping quot the actions Safety Mode took nbsp 2021-09-01 16:46:38
海外TECH Engadget Hints about the arthouse horror game created by a NIN guitarist and AAA veteran https://www.engadget.com/eyes-out-nin-robin-finck-cory-davis-horror-audio-game-164531900.html?src=rss Hints about the arthouse horror game created by a NIN guitarist and AAA veteranThere are secrets buried in the first video from Eyes Out It s just two minutes long and filled with overlapping shots of drums mics guitars and snakelike cables packed into a lonely desert hideaway all while an unsettling ambient score gathers layers of sound Over time the scenes are flooded with red and the film is overcome by a horrendous groaning scream Thin white text flashes across the screen telling a disjointed story about burying bones and walking with the bloom of a burgeoning universe Among this vibrating chaos there are hints about the kind of studio Eyes Out will be and even what the team s first game might look like Or more aptly what it might sound like Eyes Out is the new video game studio founded by Nine Inch Nails guitarist Robin Finck and veteran AAA director Cory Davis and the team is already hard at work on its first title a mysterious horror game with an emphasis on experimental audio “We want to create mind bending experiences that cause you to question reality Davis said “That s what we re really excited about We re all fans of horror but specifically this kind of ーit s a new and emerging space that doesn t just sit within the extremely violent and dark and terrifying but also reaches into the vibrant and even surprises you with moments of bliss or self reflection Horror really has a lot of room to grow Finck added on to that thought saying “We re playing in this field that provides an emotional and psychological response which really I feel is heightened as a singular experience And we re really fortunate to be attracting developers who are so genuinely passionate about these types of conversations Davis has built a successful career as a video game designer directing and crafting high profile titles including Spec Ops The Line and Here They Lie but he s also a composer In fact the first word of his Twitter bio reads “musician Meanwhile Finck s Twitter bio has just two tags both of which speak for themselves eyesoutofficial and nineinchnails Note which one comes first Eyes OutFinck got involved in the video game industry about six years ago after striking up a friendship with Devolver Digital co founder Mike Wilson at Burning Man Finck ended up handling the soundtrack for Noct a top down horror game published by Devolver in and his interest in development was piqued He dove further into the video game industry attending conventions and connecting with creators “I was just really inspired by people and their enthusiasm the forward tech of it all and the collision of art and music design agency narrative and also the experience of really becoming immersed in all of this Finck said “It really feels like the most focused and the most highly attuned experience to imbibe this sort of storytelling And that continues to turn me on And this led me fortunately enough for me to meet Cory as he and his team were completing Here They Lie Eventually Finck found himself at Sony Santa Monica playing an early version of Davis VR horror title Here They Lie He was floored by it Finck and Davis got to talking and they haven t stopped since “We immediately were talking about sound and music and the weight of that and the experience Finck said “And we kept on in the coming days and weeks and months And then eventually were working together on music for projects that Cory was heralding We have a simpatico workflow and creatively sync in a lot of ways Davis remembered feeling a spark at that first meeting too “We started to go down the rabbit hole of distortion pedals and different synthesizers and stuff like that he said “But that led us to this other type of discussion where I really felt this connection in terms of an understanding of the power of games as a medium and the impact and the possibility of what the medium holds for the future Davis and Finck were both interested in building a single player experience around music and tone rather than starting with a narrative or visual style and applying sound later on in the process “From the first conversation with Robin I could feel that he s this other type of creator that wants to be driven by his passion and his soul rather than maybe what s trendy or what s even necessarily gratifying Davis said “I just felt this kind of depth of possibility of what we could do together I had other prototypes going on at the time at my old studio but every time I got back together with Robin our conversations would go deeper And they d go beyond the music and they d go to places where I d been hoping to go my whole journey as a game developer Eyes Out is the result of this creative magnetism between Davis and Finck They ve attracted other developers too and have hired collaborators from the industries of visual art film and games to work on their first project “That s really what I ve been looking for since way back in the Spec Ops The Line days was to build a team that has a diverse enough approach to both things like the difficulties in game development as well as their acceptance and embrace of people that are from different parts of the world from different backgrounds that are of any kind of personality and especially people that have been downtrodden and haven t had opportunities in the past Davis said “We see those opportunities allowing us to have so much more depth in the types of stories that we re able to tell There s no name or release window for the studio s first game but Davis and Finck are dropping hints about how it ll play and what they want players to feel It s not a VR game it s designed with complete immersion in mind and it features creatures that behave strangely in response to generative audio cues The team is playing around with rhythm mechanics and figuring out how to build creeping tension through sound “The type of horror that we re building has a lot to do with the horrors of the universe and the horrors that you kind of go to sleep with at night the ones that are just around the corner and outside of our purview but exist Davis said “And the technology for building those types of soundscapes the localized audio and reverb and the realism behind that coming from VR before I had a lot of opportunity to work with that stuff The debut game from Eyes Out will be a focused single player horror experience built around sound ーand silence “I m really excited about the nuance and the subtlety of coming from silence like a really impactful silence and beginning to emerge from that silence towards an impactful embellishment of some sort however great or greater Finck said “And that play between the diegetic soundscape of the world within the tangible physical space inside the game and where it blurs with the score the music of the game can be really challenging and inspiring Eyes Out s first project is poised to be otherworldly introspective and experimental just like the studio itself 2021-09-01 16:45:31
海外TECH Engadget Qualcomm aptX Lossless delivers CD quality sound over Bluetooth https://www.engadget.com/qualcomm-aptx-lossless-codec-announcement-161851075.html?src=rss Qualcomm aptX Lossless delivers CD quality sound over BluetoothAbout a year ago if you wanted to stream lossless audio tracks to your phone you essentially had one option Tidal A lot has changed since then with Apple recently rolling out support for lossless streaming in June and Spotify promising to do the same later this year But unless you re willing to connect a USB DAC to your phone more streaming services jumping on the Hi Res bandwagon does you little good since Bluetooth headphones can only stream lossy audio Thankfully that s about to change Chipmaker Qualcomm is adding a new flavor to its aptX Bluetooth codec and it s a lossless one that in ideal conditions the company claims delivers CD quality bit kHz audio streaming over a wireless connection Qualcomm says it made improvements to its Bluetooth High Speed Link technology to deliver the required data throughput required to stream a lossless track wirelessly but the codec can also compress a signal down to bit kHz quality to ensure you don t experience any interruptions You can also manually switch between bit kHz and bit kHz streaming modes though the codec will automatically default to the former when it detects a lossless source nbsp nbsp Qualcomm s Snapdragon chipsets come with support for its aptX codecs built in That means almost any Android phone you buy in North America or Europe will support the standard As with all Bluetooth codecs it s not enough for only your phone tablet or computer to support the technology You also need a pair of compatible headphones or earbuds Qualcomm says the first ones to support aptX Lossless will arrive later this year Before today the closest you could get to a lossless connection over Bluetooth were Sony s LDAC and DSEE technologies Those work well but again you need a pair of Sony headphones to take advantage nbsp 2021-09-01 16:18:51
海外TECH Engadget Samsung's Neo QLED 4K TVs now come in very large (and very small) sizes https://www.engadget.com/samsung-neo-qled-the-frame-tv-sizes-160601805.html?src=rss Samsung x s Neo QLED K TVs now come in very large and very small sizesSamsung is eager to court home theater enthusiasts who want high end TVs at less than common sizes The tech giant has introduced multiple new sizes for some of its premium sets Most notably the Neo QLED K QNA series is now available in a huge inch version inches was the previous peak alongside relatively tiny and inch models This is ostensibly to allow for more flexible home theater installations although we could see those smaller sizes proving useful for bedrooms connected home gyms and dorm rooms There are additional size options for Lifestyle sets too The Frame is now available in an inch size for fans of extra large artwork while The Terrace Full Sun can be had in a inch edition for backyard viewing in bright sunlight The company didn t initially provide pricing for all of the new sets we ve asked for details However you can order the inch QNA today for normally while the inch The Terrace Full Sun is available for None of these new sets is likely to be a trivial purchase then but they could be welcome moves if you don t want to sacrifice quality just to get a TV that fits your living space 2021-09-01 16:06:01
海外TECH CodeProject Latest Articles A Static Analysis Tool for C++ https://www.codeproject.com/Articles/5246833/A-Static-Analysis-Tool-for-Cplusplus automating 2021-09-01 16:31:00
海外科学 NYT > Science When Will the Delta Surge End? https://www.nytimes.com/2021/09/01/health/covid-delta-us-britain.html bumpier 2021-09-01 16:33:35
海外科学 NYT > Science Covid Survivors More Likely to Have Kidney Problems, Study Finds https://www.nytimes.com/2021/09/01/health/covid-kidney-damage.html Covid Survivors More Likely to Have Kidney Problems Study FindsIn a study of veterans Covid survivors were percent more likely than other patients to have long term kidney damage or declines in kidney function 2021-09-01 16:04:30
金融 RSS FILE - 日本証券業協会 証券投資の税制 https://www.jsda.or.jp/anshin/oshirase/index.html 証券 2021-09-01 17:00:00
金融 金融庁ホームページ 「資金移動業者に関する内閣府令第二十一条の五第一項の規定に基づき金融庁長官の指定する規則を定める件(案)」について公表しました。 https://www.fsa.go.jp/news/r3/sonota/20210901.html 内閣府令 2021-09-01 17:00:00
金融 金融庁ホームページ 外国損害保険業の免許について公表しました。 https://www.fsa.go.jp/news/r3/hoken/20210901.html 損害保険 2021-09-01 17:00:00
金融 金融庁ホームページ 「主要行等向けの総合的な監督指針」、「金融商品取引業者等向けの総合的な監督指針」の一部改正(案)に対するパブリックコメントの結果等について公表しました。 https://www.fsa.go.jp/news/r3/ginkou/20210901-2/20210901-2.html 金融商品取引業者 2021-09-01 17:00:00
ニュース ジェトロ ビジネスニュース(通商弘報) 第2四半期のGDP成長率は前期比1.0%、財務省も経済見通しを上方修正 https://www.jetro.go.jp/biznews/2021/09/ac80a80ba8db01c4.html 上方修正 2021-09-01 16:20:00
ニュース ジェトロ ビジネスニュース(通商弘報) フランス、アルジェリアとモロッコの断交で両国に対話呼び掛け https://www.jetro.go.jp/biznews/2021/09/70f6ac18afb6c5dd.html 断交 2021-09-01 16:10:00
ニュース BBC News - Home Afghanistan: Unknown number of people left behind in Afghanistan, says Dominic Raab https://www.bbc.co.uk/news/uk-politics-58411322?at_medium=RSS&at_campaign=KARANGA foreign 2021-09-01 16:24:07
ニュース BBC News - Home Wetherspoons runs low on beer amid driver shortage https://www.bbc.co.uk/news/business-58395401?at_medium=RSS&at_campaign=KARANGA drivers 2021-09-01 16:17:59
ニュース BBC News - Home Covid: Children's long Covid study and Scotland's vaccine passports https://www.bbc.co.uk/news/uk-58413927?at_medium=RSS&at_campaign=KARANGA coronavirus 2021-09-01 16:11:36
ニュース BBC News - Home Texas passes law banning abortion after six weeks https://www.bbc.co.uk/news/world-us-canada-58406496?at_medium=RSS&at_campaign=KARANGA court 2021-09-01 16:26:25
ニュース BBC News - Home Banksy-painted building in Lowestoft adds £200k to asking price https://www.bbc.co.uk/news/uk-england-suffolk-58412561?at_medium=RSS&at_campaign=KARANGA banksy 2021-09-01 16:44:43

コメント

このブログの人気の投稿

投稿時間:2021-06-17 22:08:45 RSSフィード2021-06-17 22:00 分まとめ(2089件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)