IT |
気になる、記になる… |
昨日に画像が流出したソニーの新型ヘッドホンは「WH-CH720N」 ー 「WH-XB910N」の後継モデルではない模様 |
https://taisy0.com/2023/02/11/168372.html
|
thewalkmanblog |
2023-02-10 15:20:22 |
AWS |
AWS Compute Blog |
Scaling an ASG using target tracking with a dynamic SQS target |
https://aws.amazon.com/blogs/compute/scaling-an-asg-using-target-tracking-with-a-dynamic-sqs-target/
|
Scaling an ASG using target tracking with a dynamic SQS targetThis blog post is written by Wassim Benhallam Sr Cloud Application Architect AWS WWCO ProServe and Rajesh Kesaraju Sr Specialist Solution Architect EC Flexible Compute Scaling an Amazon EC Auto Scaling group based on Amazon Simple Queue Service Amazon SQS is a commonly used design pattern in decoupled applications For example an EC Auto Scaling … |
2023-02-10 15:35:55 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
windowsでseleniumを使用してキャプチャを自動でとる |
https://qiita.com/sszzszsz/items/4182c2b4aa4bf8f5037b
|
selenium |
2023-02-11 00:29:47 |
js |
JavaScriptタグが付けられた新着投稿 - Qiita |
【JavaScript】コロンのないオブジェクト!? |
https://qiita.com/Voldemort/items/70912ca705aa7d81a8f7
|
javascript |
2023-02-11 00:58:01 |
js |
JavaScriptタグが付けられた新着投稿 - Qiita |
なんか、Swiperもっさりしてるな |
https://qiita.com/naninanya/items/6f971b6c95fbb270992d
|
purejs |
2023-02-11 00:55:07 |
AWS |
AWSタグが付けられた新着投稿 - Qiita |
VPC作って、インターネットゲートウェイとNATゲートウェイを配置する |
https://qiita.com/kotori118/items/0f57e4ee6340aa916e3a
|
awssoa |
2023-02-11 00:44:28 |
海外TECH |
MakeUseOf |
How to Fix the "ChatGPT Is at Capacity Right Now" Error on Windows |
https://www.makeuseof.com/chatgpt-at-capacity-right-now-windows/
|
How to Fix the amp quot ChatGPT Is at Capacity Right Now amp quot Error on WindowsSometimes ChatGPT is simply overloaded Other times the problem lies with your Windows PC Here s how to find out what s causing this error |
2023-02-10 15:16:15 |
海外TECH |
MakeUseOf |
These Are the Best Samsung Galaxy S23 Deals: Trade-In, Gift Cards & More |
https://www.makeuseof.com/samsung-galaxy-s23-deals/
|
morethe |
2023-02-10 15:10:16 |
海外TECH |
DEV Community |
Why you Should Use GraphQL APIs in your Next Project |
https://dev.to/hackmamba/why-you-should-use-graphql-apis-in-your-next-project-k4l
|
Why you Should Use GraphQL APIs in your Next ProjectThis article was originally posted on Hackmamba An application programming interface API is a software interface that allows applications to talk to each other With APIs we can log in to our favourite platforms check out Google Maps and more commonly query or interact with a database An exciting development in how we collect data via APIs is the GraphQL query language Through this article we will examine why we should use the GraphQL API in our next project with step by step implementation PrerequisitesTo follow through we need the following A basic understanding of JavaScript and React jsDocker Desktop installed on our computer run the docker v command to verify that we have Docker Desktop installed and if not install it from the Get Docker documentationAn Appwrite instance running on our computer check out the Appwrite documentation to learn how to create a local Appwrite instance A Next js application check out the Next js documentation to learn how to create a new Next js application What is GraphQL GraphQL is an open source data query and manipulation language for APIs and a runtime for fulfilling queries with existing data Developed by Meta formerly named Facebook GraphQL allows clients to define the structure of the data they need from the database and this structure is returned from the server With GraphQL becoming increasingly popular this article aims to discuss its benefits the need for Appwrite s GraphQL protocol and finally how to implement Appwrite s GraphQL protocol in our next project The benefits of using GraphQL APIsWith more developers opting to use GraphQL APIs instead of the very popular REST APIs we must understand the advantages that GraphQL gives us over the traditional REST APIs GraphQL is fasterGraphQL allows us to query the specific data we want from our database With GraphQL cutting down our query requests querying data with GraphQL APIs becomes faster than other communication APIs improving the overall developer experience Fetch Data in a single API callFetching data and manipulating data with REST APIs sometimes require us to write different API calls to different endpoints GraphQL focuses on the tasks and uses one endpoint the graphql endpoint GraphQL can fetch all the data we need with one API call No over and under fetching informationREST APIs are notorious for containing too much or insufficient information in their responses This over and under fetching problem results from data scattered across different endpoints GraphQL solves this problem by allowing us to fetch the exact data we need in a single request Validation and type checking out of the boxWith GraphQL we can ensure that the application only queries the data we have in our database in its appropriate format GraphQL also validates the data format for us API evolution without versioningREST and GraphQL APIs deal with evolving APIs differently REST APIs commonly offer new versions to deal with evolving APIs GraphQL however deprecates APIs on a field level thereby removing the need for different versions We can remove aging fields from the schema without affecting the existing fields or queries Common Challenges With GraphQLAs with any good development in technology challenges might arise when using GraphQL and these challenges are discussed in the paragraphs below Performance issues with complex queries GraphQL allows us to query for the exact data we need but performance issues arise when we query for too many nested fields and resources Web caching complexity Compared to GraphQL REST APIs have multiple endpoints allowing them to leverage native HTTP caching to avoid re fetching resources or data whenever a client requests them As GraphQL uses only one endpoint graphql caching becomes difficult as we would need to set up our caching support possibly with an external library It takes a while to understand GraphQL is a lot more complex to understand than the traditional REST APIs Implementing GraphQL usually requires some prior knowledge like understanding the Schema Definition Language etc While GraphQL offers amazing benefits as explained in the section above learning and implementing simple GraphQL queries can take some time The Need for Appwrite s GraphQL ProtocolNow that we have discussed the challenges of implementing GraphQL in a production environment this section tells us how Appwrite s GraphQL protocol addresses these challenges SecurityGraphQL exposes a single endpoint for all queries and mutations making it more difficult to implement traditional security measures such as rate limiting and access control Appwrite addresses security concerns by using secure cookies and API keys to restrict data to specific identities as well as rate limiting a maximum amount of queries allowed to execute per request a maximum query complexity and a maximum query depth to mitigate abuse CachingAs discussed under Common Challenges with GraphQL GraphQL lacks built in caching support because it uses one endpoint graphql Appwrite on the other hand handles caching at a few different levels first with HTTP headers and later with some data stores and memory caching for specific resources Error HandlingAppwrite has explicit and descriptive error messages making it easy to understand a problem regardless of the status code Reduce the learning CurveGraphQL is easier to write with Appwrite as we do not need to worry about creating our GraphQL server or schema Implementing GraphQL in your Next js Project with Appwrite Understanding the importance of Appwrite s GraphQL protocol we need to know how to implement them in our Next js project Creating a new Appwrite projectWhen we created an Appwrite instance during the prerequisites section we specified what hostname and port our console would live in The default value is localhost Go to localhost and create a new account to see the console On our console there is a Getting Started Guide page We choose the Web App option under Add a Platform Next we register our Web app We add the Appwrite SDK to our project by running this terminal command in our root directory cd lt our project name gt npm install appwriteIn our project s root directory we create a env local file to store our project ID NEXT PUBLIC PROJECT ID In our index jsx file we initialize our Appwrtite web SDK import Client Graphql from appwrite const client new Client client setEndpoint http localhost v setProject process env NEXT PUBLIC PROJECT ID const graphql new Graphql client Connecting to the Appwrite Locale API with GraphQLThis section discusses how to query continent names from the Appwrite Locale API using Appwrite s GraphQL protocol Creating the continent select buttonThrough the Appwrite Locale API GraphQL can query only the continent names without additional information We paste this code in our index jsx file to query this data import Head from next head import styles from styles Home module css import Client Graphql from appwrite import useEffect useState from react const client new Client client setEndpoint http localhost v setProject process env NEXT PUBLIC PROJECT ID const graphql new Graphql client const Home gt const continents setContinents useState const getContinents async gt try const q await graphql query query query localeListContinents total continents code name setContinents q data localeListContinents continents catch error const appwriteError error throw new Error appwriteError message useEffect gt getContinents return lt div gt hello world lt div gt export default Home In the code block above we do the following Create state variables to store the response from our GraphQL queryGet all the names of the continents in the world using Appwrite s Locale API We specify that we want only the continent names and the code to know if the query is successful or notSave the GraphQL response in our state variablesThrow any error we encounter while querying the informationUse the useEffect hook to call the getContinents function once the page mountsRendering the GraphQL responseIn this section we will loop through the GraphQL response and render options in the select dropdown return lt div gt continents lt select name continents id continents gt continents map continent gt lt option value continent name gt continent name lt option gt lt select gt null lt div gt In the code block above we Make sure the continents state variable is not empty before rendering its valuesLoop through the continents and render them as options in the select dropdownAfter this section here is how our application looks ConclusionGraphQL is a fascinating development in the software space With its strength in specialised queries we can make quick and impactful API calls to our database This article discusses GraphQL its advantages and disadvantages the need for Appwrite s GraphQL protocol and how to implement the query language in our next project ResourcesThe following resources are helpful GraphQL A query language for your APIGraphQL Core Features Architecture Pros and ConsGraphQL Docs Appwrite |
2023-02-10 15:32:06 |
海外TECH |
DEV Community |
Why we Server Side Render Web Components |
https://dev.to/begin/why-we-server-side-render-web-components-40f6
|
Why we Server Side Render Web ComponentsBack on January th I presented at thejam dev an on line event featuring talks on Jamstack web development and serverless hosted by our friends at Certified Fresh Events What follows is our rationale on choosing the platform over chasing JavaScript frameworks A transcript follows immediately after the video Video TranscriptI m here today to talk to you about server side rendering web components and we re going to get into that Unfortunately we have to do some background information first to get there but we ll build up to it I m going to start off my talk by asking a very silly question have you ever had a dependency break on you Okay it s a stupid question I mean dependencies are unstable and can be a time sink This unplanned work keeps you from iterating on your product and it s frustrating There s an excellent quote from Jeff Bezos I very frequently get the question What s going to change in the next years I almost never get the question What s not going to change in the next years And I submit to you that that second question is actually the more important of the two because you can build a business strategy around the things that are stable in time Jeff BezosPeople always ask him what will change in the next ten years and how we will prepare for this Still they rarely ask what s not going to change in years what s going to be stable He thinks the second question is way more important because you can build a strategy for the stable things you can create a business on I would argue that it s way easier to predict the things that aren t going to change over the next couple of years and that s what you can use as a solid foundation to build your business Why do we want to build businesses on top of things that don t change Software is complicated and it is certainly not made less complex by adding a lot of dependencies to your software Arguably it s made way worse because these dependencies often conflict with one another and that can be a huge pain Now we ve seen this kind of thrash before Web browsers used to be very broken The browser ecosystem used to change all of the time It was not uncommon for different browsers to interpret capabilities differently and therefore they would break different websites Web browsers don t break anymore When it comes down to it the web standards that we have evolved to now give you consistent behavior across a bunch of different browsers as long as the standards are implemented Which they are in most cases and the browsers automatically update themselves to be evergreen You never have to worry about them being terribly out of date To remain competitive in the browser marketplace they must maintain this backward compatibility so you know that these things will always work Web browsers are backwards compatible What we mean by this backwards compatibility is that if you look at sites and code written over years ago you ll see that they still work perfectly well in today s modern browsers One example of this is jQuery jQuery was used in many sites to smooth over the differences in these browsers Over time as the browsers became more and more standard compliant we didn t need jQuery anymore We were able to drop that dependency and use what was in the platform but if you have a site written in it ll still work even with an old version of jQuery because the browsers have not introduced breaking changes We have to ask ourselves if the browser can be that stable can our own source code be that stable as well I would posit that breaking changes are optional Unfortunately we tend to opt into them eagerly Just because you know you re picking a framework that compiles to a web standard doesn t mean that you re enjoying those web standards so you might think about that a little bit more When it comes to changes there are two kinds of change and of course the answer to my previous question is yes we can opt into things so that our source code doesn t break and it s very stable There are two kinds of changes that we have to look out for The first is the bad one That is a breaking change That s when we see the removal of APIs interfaces or behaviors In some cases if you re removing something because it s a security issue it makes perfect sense to get rid of it A lot of times there s breaking changes for the sake of being a breaking change Many times the package is handling things using semver correctly Updating to a major whenever breaking changes are introduced Introducing a breaking change on a minor or patch release is terrible because that is different from how semver is supposed to work Those who have been around long enough probably remember the giant breaking change from going from Angular x to x It was a complete rewrite of your application and then they did it to us again in a later version of Angular A lot of people were burnt too many times by Angular and moved on to other frameworks React has some breaking changes in it as well It s handling things properly because it s breaking things on a major version bump Typescript a minor update also includes breaking changes that are not what you want to see You want those changes to be introduced on major versions If you follow semver and see Typescript is out you think I ll just upgrade it because it s only a minor change It shouldn t have any breaking issues and there you go You ve introduced a breaking change and you ve got a whole bunch of unplanned work because of it so you want to pick dependencies wisely or eliminate them Frameworks that properly handle these changes for you and ensure that they re using semver properly are the other type of change that is the good change An additive change is just that it adds new functionality without removing any of the old stuff HTTP x to x is great as it gives us new capabilities but it keeps the old protocol intact We used to use XMLHTTPRequest for Ajax That was a pretty good API to start with but we ve refined it into fetch and that s a much better API for developer ergonomics We ve added things like async await which you can use or you can still do promises or callbacks We ve added the module type of a script tag as well Instead of just using the old standard script tag we can tell people that this is like a new ES module These are all examples of additive changes to the platform without breaking anything else and that s just great Now the front end itself is also very complicated The front end is this vast ecosystem with many compatibility problems so it s very common for you to transpile code But those subtle differences between the code you write and the code that is run can cause unexpected breakages which is very frustrating Looking at these templating systems earlier versions of JavaScript didn t have the string template literal concept so we took a page from other runtimes like Java or Ruby or Python and we created these templating languages It s like embedding a smaller language into your bigger language and sometimes it makes the syntax hard to read Because it s not very standard it s not JavaScript Then we have other things like non standard dialects like JSX JSX is not JavaScript It looks like JavaScript It acts like JavaScript but you can t run that code directly in a browser You have to do a translation step for JSX to be executed in the browser so the code that you write and the code that you run in the situation is very different again Another way of doing things is introducing a completely new programming language and then using it to compile down to web standards That s the thinking behind Svelte and it has all the same problems as a templating language It s like HTML it s like JavaScript but it isn t Now you have to give credit to Svelte because they are very upfront with this being a non standard dialect and you know they stand by the idea that a compiler is a better solution because it can output more efficient code TranspilationOkay let s take a look at some of the transpilers output The problem with transpilers is that they obfuscate the runtime code It s bad and it gets worse as you dig in Let s take a look at this code example self webpackChunk N E self webpackChunk N E push function t e r var r Buffer n r function var e a f h d C u function t e r var i e bignum r define r define i base r constants r i decoders r i encoders r function t e r var i r n r function a t e this name t this body e this decoders this encoders e define function t e return new a t e a prototype createNamed function t var e try e r runInThisContext function this name entity n this initNamed entity n catch i e function t this initNamed t return n e t e prototype initNamed function e t call this e new e this That could be more readable Any kind of debugging in this environment will be tough to diagnose You need to figure out where things are coming from because this isn t the code you wrote It has no bearing on the code that you wrote e Decipheriv s Decipheriv e createDecipheriv s createDecipheriv e getCiphers s getCiphers e listCiphers s listCiphers f P e DiffieHellmanGroup f DiffieHellmanGroup e createDiffieHellmanGroup f createDiffieHellmanGroup e getDiffieHellman f getDiffieHellman e createDiffieHellman f createDiffieHellman e DiffieHellman f DiffieHellman h p e createSign h createSign e Sign h Sign e createVerify h createVerify e Verify h Verify e createECDH p d p e publicEncrypt d publicEncrypt e privateEncrypt d privateEncrypt e publicDecrypt d publicDecrypt e privateDecrypt d privateDecrypt c p e randomFill c randomFill e randomFillSync c randomFillSync e createCredentials function throw Error sorry createCredentials is not implemented yet we accept pull requests n e constants DH CHECK P NOT SAFE PRIME DH CHECK P NOT PRIME DH UNABLE TO CHECK GENERATOR DH NOT SUITABLE GENERATOR NPN ENABLED ALPN ENABLED RSA PKCS PADDING RSA SSLV PADDING RSA NO PADDING RSA PKCS AEP PADDING RSA X PADDING RSA PKCS PSS PADDING POINT CONVERSION UNCOMPRESSED POINT CONVERSION UNCOMPRESSED POINT CONVERSION HYBRID t exports b Now lines of code is normal for a trivial bundle and that s not very efficient and it s a terrible developer experience for you to debug Many people will think that Source Maps will fix this problem but quite often they fail to work especially when you re running in an environment like Node js which is not built for this type of thing Do you know what your tools are doing when you introduce something like a transpilation step You re just counting on them to do the right thing for you so let me give you an example of something I recently encountered when inspecting an application self LOADABLE LOADED CHUNKS self LOADABLE LOADED CHUNKS I push C e r gt var o r toLower r r o placeholder r exports o e r gt var o r exports function return o toLowerCase This one liner is bytes A tiny completely separate JavaScript file As near as I can tell it adds a method called toLower which calls toLowerCase How is that optimizing code for you Why is that better I don t understand It saves me typing four characters but going through this every time I need to call something in the platform is a bad idea that will add overhead Regardless check what your tools are doing folks Static DynamicEarlier today Henri discussed metrics like first contentful paint and time to interactive These metrics could be better when we re using our giant frameworks What s happening is we have to send JavaScript down to the browser to be able to create the user interface which then makes API calls to the back end to populate the interface with the data So that s going to impact your first contentful paint and your time to interaction You really want to look at that ーis that really the right way to do things We have way too many moving parts in today s modern JavaScript environment What can we get rid of We can simplify this situation What are the root causes of the complexity How do we avoid this kind of stuff One of the ways that we can prevent this is by going back to the way web pages and websites were previously written and we have a new case for Progressive enhancement Progressive enhancementProgressive enhancement is not new people have been doing it for a long time At some point it ran out of fashion and you know I love JavaScript It helped me not buy my house but put a pretty good down payment on it but it does get to be a bit fashiony sometimes Progressive enhancement went out of style but we should bring it back and think about it more because there are many reasons First the ethical reason for inclusivity We want as many people as possible to use our websites and applications and when you build with progressive enhancement you start with a working HTML The most accessible application that you could start with There are business reasons as well if you need to make that argument The bigger your audience the more devices and people can use it This translates to more money they will spend on your products or services Finally there s the selfish developer reason as I hate fixing broken stuff I like it when stuff works If I have a way that it will work for screen readers and old web browsers it will work for the evergreen web browsers It s going to work on a new device that s coming out that is a virtual voice assistant or something like that all because we re using progressive enhancement techniques That s what I want because I will spend more time working on the product adding new functionality that makes my customers happy instead of chasing a bunch of breaking changes With progressive enhancement you start with working HTML and using standard anchors and forms Then you make it better by adding JavaScript to it Not the other way around Don t start with a bunch of JavaScript to see where it fails and then make sure that the failure cases are still workable That s graceful degradation IMHO progressive enhancement is way better than graceful degradation When we talk about doing HTML first we re not talking about HTML only JavaScript comes second in your application because that s how web browsers work Open up any site with your inspector and go to the network tab The first thing that gets loaded is your HTML and then your HTML is used to structure the page After your HTML and your CSS are loaded then JavaScript is loaded That s what makes your page better It gives it more interactivity but it should be a sprinkling of JavaScript not a tsunami of JavaScript Next GenerationThere are a lot of Next Generation front end Frameworks that are HTML first For example ty Remix and Astro All of these frameworks are looking at doing HTML first HTML first is the new marketing way of saying progressive enhancement As I mentioned earlier progressive enhancement got a bad reputation and went out of style You could look at any of these Frameworks and see how they re doing things At Begin we ve had this open source project since Tens of thousands of apps are built on top of Architect which has always been HTML first We develop our applications using Cloud functions to output HTML directly from the server so everything that comes down from the server is working HTML that we then enhance with JavaScript on the client side We ve been doing this for five or six years now The things we learned during that time inferred what we would do later with the Enhance framework What if the entire back end was just pure cloud functions Architect the open source project is mainly concerned with the back end Instead of load balancing a whole bunch of web servers let s just make all of the back end things like small cloud functions that we can manage using Architect and it s been working pretty amazing so far With the modern JS ecosystem we ve got some major problems First it s brittle these ecosystems are incompatible with each other and often fail We also have these non standard template libraries or worse opaque programming languages that we have to add on top of things adding more complexity to building web applications Quite often they are static not dynamic You re not getting the content that the user wants right from the very beginning and it results in all of these kinds of spinners skeleton screens and bad metrics on your time to first interaction Can our front end Source be pure standard based HTML CSS and JavaScript What if we started with web standards instead of learning a non standard programming language like JSX and compiling it into JavaScript Let s start with some very basic primitives and get things working incrementally Let s pick HTML and CSS We ll start with that from the very beginning take those Legos and stack them up to build bigger and better things Once it all works we can add client side JavaScript for more enhanced browser behavior In other words what I m trying to say is Use the platformBack in the day we used to use jQuery for everything but now we rarely need to reach for it since the most important parts of jQuery have become part of the platform It made it so much easier to do query selectors in jQuery Still now we have querySelectorAll built into the platform and it s because of the popularity of jQuery that we have those APIs It s the same thing with some of our modern JavaScript Frameworks that we use to build reusable component user interfaces We ve popularized a lot of them but is there something in the platform that we can use today that will reduce our dependencies on some of those Frameworks Of course there is Web componentsWeb components are a suite of different technologies that allow you to create reusable custom elements and utilize them in your web applications These custom elements are all encapsulated away from the rest of your code The styling and the behavior can be contained in a single file so that you can reuse them in different projects and it doesn t affect other parts of your application Three main specifications are used when you re building web components Custom elements A set of JavaScript APIs that allow you to define custom elements and their behavior which can then be used as desired in your user interface Shadow DOM A set of JavaScript APIs for attaching an encapsulated shadow DOM tree to an element ーrendered separately from the main document DOM ーand controlling associated functionality In this way you can keep an element s features private so they can be scripted and styled without the fear of colliding with other parts of the document HTML templates The lt template gt and lt slot gt elements enable you to write markup templates that are not displayed in the rendered page These can then be reused multiple times as the basis of a custom element s structure React is about to have its th birthday in mid Web components have already had their th birthday because it s been out since The difference is it was an evolving standard For many years I wouldn t say that it was ready for prime time but we ve reached a point now where web components are available across all of the evergreen browsers and there s no reason not to use them right now so if you can use a web component and get rid of some of the large JavaScript frameworks that you re using to build UIs right now you should probably take a look at doing something like that Web Components have problems All solutions have issues A couple of things that you will notice with web components is that they don t progressive enhancement very well Unfortunately when you set up a web component you use JavaScript to define it You have to call the customElements define method in order to register your component with the browser If JavaScript fails for any reason and believe me there are a lot of reasons that JavaScript may fail and it s not because somebody has just decided to turn it off because they feel like watching the world burn There are network issues DNS problems and captive portal just to name a few There are lots of good reasons why JavaScript may run into issues This is a problem with web components because if you don t have JavaScript you will not be able to instantiate that web component and the browser won t know what to do with the custom tag you re giving it The other problem is the way that browsers work First you load the HTML then the CSS and finally the JavaScript If you have a tag that is your custom element until that JavaScript is loaded parsed and executed it won t know how to display that custom element Instead you get a white box which will flash into what it should look like That s called the flash of unstyled custom element FOUCE These are a couple of things that you have to be aware of when you re dealing with web components There are common problems but I would only bring these up if it had a solution for them Enhance is an HTML framework It s another open source project that we work on at Begin It allows you to author your pages in HTML using generally available web standards like web components to build your UIs and then progressively enhance that working HTML with some client side JavaScript to make everything better The fun thing about Enhance is you write your web component as a pure cloud function Using Enhance your custom element is expanded on the server We determine which parts of the web component to send down the wire so that when the initial HTML is loaded in the browser we don t need to wait for customElements define because all of the HTML inside it is already expanded This removes the issue if JavaScript fails and you can t call customElements define It also removes the Flash of unstyled custom element because your initial HTML is already there It also allows you to do kind of that personalization on the server where you send all the data down immediately and that s also going to help your metrics Your time to first interactive is going to be a lot quicker your first contentful paint is going to be better as well because the data is already there in the HTML We re not waiting for the JavaScript to be load and we re not waiting for that API call to be made after the page is loaded we ve already got that data for you Demo Enhance key conceptsFile based routing with plain HTMLReuse markup with custom elementsBuilt in utility CSS based on scales rather than absolute valuesAPI routes without manually wiring propsProgressively enhance with standard JS no special syntaxFull stack FWA under the hoodWith enhance dev we are doing a good job of bringing together both the front end and the back end Suppose you are going to do some in client side JavaScript You would end up adding a script tag to what you send down to the client and that s where you would instantiate your web component on the client side register your event listeners and do all your other standard JavaScript Underneath the hood we re using Architect to deploy We re using AWS to run your cloud functions and Dynamo DB for your database It s a fully functional web app with infrastructure as code to manage everything for you Further resourcesIf you want more information on this the best thing to do is check out Enhance docs at enhance dev Join our Discord to ask us questions as we re happy to hear from you and of course follow us on Mastodon Q amp ASean Davis Thanks Simon I love that presentation I have so many questions so I m going to jump right in You know here at TheJam Dev we re often talking about the Jamstack and different trends I know that folks are still holding on in some ways to the more traditional static site generators but we re seeing more server side rendered content So I imagine a lot of folks are watching your presentation and thinking is it just is it like exclusively SSR or do you have an option to pre render content with Enhance Is that in the works or are you solely focused on the server Simon MacDonald We re exclusively focused on the server side rendering piece One of the things that I neglected to show is that there is a public bucket which maps to an S bucket If you wanted to run a process outside of enhance that would populate that bucket with your static site generated content you can do that One of the traditional things I ve seen people use Jamstack for is rendering a bunch of markdown files converting them into HTML and storing them in your bucket We ve had a lot of success automatically generating that HTML on the fly It does not take very long at all Enhance dev itself uses that approach It s an open source project You can see how we did it We ve written an article on it before as well There s not a performance penalty on that and one of the nice things about rendering things this way is that if you have to insert any kind of dynamic content or personalization based upon the user that is logged in you can query that on the server side and send it down the wire with the initial page load and not have to wait for another API call to be done after the fact and that s kind of where this step fits into the new definition of Jamstack because there s no one right way to do it anymore Sean Davis I imagine you will be able to use this in conjunction with Begin but what about a lot of those other Cloud providers Can you deploy an Enhance application anywhere Simon MacDonald Right now Enhance applications are deployable to AWS We ll give you the best experience possible on Begin to deploy to our infrastructure but if you do not feel like using Begin you can use Architect to deploy directly to AWS Of course if you really feel like you want to manage it all yourself you can eject from Architect and deploy directly to AWS In that case you ve got to manage cloud formation and I do not recommend that In this case you d definitely want to use a tool to do your infrastructure as code A line Architect manifest file with maybe five API calls and a static bucket ends up being lines of CloudFormation You don t want to write that That s just terrible Sean Davis A case where using the abstraction layer is totally okay right Simon MacDonald Exactly Sean Davis I also noticed that there were a handful of MJS files in the project and I know this is very like very polarizing topic I m curious about your opinion and Enhance s opinion on typescript Is that something that you have native support for or do you feel like that goes against the idea of getting back to the basics using native libraries etc Simon MacDonald Personally I m not a fan of typescript You can use typescript with Enhance and Begin but you re adding a transpilation step to your project The typescript code you write is not the JavaScript code that gets executed on your browser and we re trying to avoid that It makes your code more difficult to debug I know that people love a lot of Typescript s functionality I m very excited about one of the proposals that TC which is to add type annotations to JavaScript Enabling static type checking at development time while not adding any overhead at runtime Sean Davis Henri mentioned that he profiled the CBS Sports website and said that they re currently running jQuery version which was launched back in November I loved the beginning of your talk where you had the quote from Jeff Bezos on what will change in the next ten years and getting back to focusing on what will be stable So I m just curious from a general perspective do you see it as bad practice to use old libraries if jQuery still works Is that still okay to use How do we balance that with all the new shiny stuff coming out Simon MacDonald I don t have any problem with using jQuery My recommendation in that particular case would be to stop using it because many of the things in jQuery have ended up in the platform You can reduce the amount of JavaScript you send to your client using the platform directly That s one of my arguments with a lot of the other UI Frameworks They were around when we didn t have a good component model in the browser but now that we do they should be starting to remove some of their complexity in favor of web components But we re not seeing that right now so we ll see what happens The nice thing is if you started a business ten years ago building WordPress and using jQuery you re still making a lot of money doing that right now It may not be sexy It may not be the most technically difficult thing but you re still making a living on it because the platform isn t breaking on youIf you started using React five years ago or seven years ago you went from createElement to JSX to hooks to whatever is the new thing this year This churn happens every months or so as React re invents itself and you re chasing those changes non stop You have to ask yourself did I waste a lot of time I could have used building functionality for my customers and making money Instead of just chasing these unplanned outages I try not to slag on React too much as I have used it for many years but I think I have seen the light Sean Davis Totally fair Now there are mixed opinions on this but you mentioned web components had their th birthday already and I felt like there was a lot of noise in the first couple of years and then fell off for a while React got super popular and still is but within the last six to months I have seen a lot more noise around web components in this space I know that you re betting on it I m curious about your perspective Do you see the same trend I guess what I m trying to ask is are you seeing this approach resonate with folks Do you feel like we re going to start to see some other Frameworks pop up as well Is this a trend we re seeing getting back to the basics Simon MacDonald I believe that We are seeing things not just Enhance but Astro ty with WebC also using web components Major companies like Google have built YouTube using web components Adobe is making all of its Creative Cloud Web apps using web components Web components are ready for prime time right now When it was initially announced it was a spec that was still evolving and it wasn t quite ready yet When it comes to the evolution of specs it takes a while before these things solidify and get all of the use cases right That s where client side libraries are super helpful because they can iterate rather quickly jQuery is an example it iterated quickly and eventually those things ended up in the platform On the mobile side Adobe PhoneGap Apache Cordova implemented a bunch of APIs for connecting to the camera using geolocation and other mobile APIs that eventually made their way into the platform Why aren t some of the things React Vue and Angular do being replaced with what the platform already has available That s web components I think you ll see many people starting to head in that direction Sean Davis That makes a lot of sense I m going to keep an eye on it because I love the concept of getting back to the basics using native libraries and I m excited about what you ve got going on with Enhance |
2023-02-10 15:07:53 |
Apple |
AppleInsider - Frontpage News |
How Apple avoided Big Tech's mass layoffs |
https://appleinsider.com/articles/23/02/10/how-apple-avoided-big-techs-mass-layoffs?utm_medium=rss
|
How Apple avoided Big Tech x s mass layoffsApple has not had to make thousands of employees redundant because it was careful not to hire too many over the pandemic ーand new figures show just how careful it was Tim Cook has already said that Apple is being cautious in its recruitment following the pandemic and the downturn that s led to massive job cuts in Big Tech firms What he hasn t mentioned is that Apple was also careful not to over recruit when the pandemic was its worst According to new figures from Bloomberg the number of Apple employees grew between and That compares to a increase at Alphabet Google s parent company and close to at Amazon and Salesforce Read more |
2023-02-10 15:03:14 |
海外TECH |
Engadget |
Amazon's Ring video doorbells and cameras are up to 35 percent off right now |
https://www.engadget.com/amazon-ring-video-doorbells-cameras-sale-good-deal-154319731.html?src=rss
|
Amazon x s Ring video doorbells and cameras are up to percent off right nowAmazon has put many of its Ring video doorbells and cameras on sale for up to percent off One of the most notable price drops is for the Video Doorbell which has returned to a record low of That s percent off the regular price of It offers p video and improved battery life over previous models Amazon claims You can run the Video Doorbell wirelessly or hook it up to existing doorbell wiring It can connect to GHz and GHz WiFi networks and it has interchangeable face plates There are color video previews for all detected motion events Moreover a quick replies function allows you to set common responses that trigger when someone comes to your door For instance it might ask a delivery person to place a package in a certain spot and invite them to leave a voice message for you Several other Ring devices have dropped to record low prices as part of this sale including the battery powered Spotlight Cam Plus It s currently available for or percent off the usual price of The p camera offers color night vision and a way to access a live feed at any time You can set up customizable motion zones so you ll only be notified about activity that s say close to your door or windows There are two motion activated LED spotlights a built in security siren and a two way talk function The battery powered Stick Up Cam is on sale as well as it s down from to This can be perched on a flat indoor surface or mounted outside It offers p video two way talk and real time notifications As with the Video Doorbell and Spotlight Cam Plus the battery pack has a quick release function You can also save on the more compact Ring Indoor Cam which has dropped by to This has similar functions to the Stick Up Cam but it s designed for indoor use and has to be plugged into a power outlet Like the other products it works with Alexa and you can use an Echo Show Echo Spot or the Ring app to see what the camera is capturing |
2023-02-10 15:43:19 |
海外TECH |
Engadget |
The second-gen HomePod may be easier to repair than the first |
https://www.engadget.com/homepod-2-second-gen-teardown-repairability-151518781.html?src=rss
|
The second gen HomePod may be easier to repair than the firstThe original HomePod was notoriously difficult to repair to the point where cutting tools were sometimes necessary Apple isn t giving nearly as much grief with the second gen model however iFixit has torn down the new smart speaker and discovered that it s far easier to pry open The large amounts of glue are gone ーyou can get inside using little more than a screwdriver and the internal components are similarly accessible Combine this with the detachable power cord and it should be feasible to fix at least some parts yourself iFixit cautions that it hasn t tested for possible software restrictions on repairs It s not clear that you can replace circuit boards and still expect a functioning HomePod Even so it s evident Apple considers repairability to be a priority this time around much as it does with the standard iPhone and other recent products Not that Apple has much choice but to make the HomePod more fix friendly Both federal and state governments are pushing for right to repair mandates If Apple didn t make the speaker easier to maintain it risked a political pushback And while we wouldn t count on Apple adding the HomePod to its Self Service Repair program the second gen s design makes that prospect more realistic |
2023-02-10 15:15:18 |
海外TECH |
Engadget |
Sony A7R V review: Awesome images, improved video, unbeatable autofocus |
https://www.engadget.com/sony-a7r-v-review-awesome-images-improved-video-unbeatable-autofocus-150058082.html?src=rss
|
Sony AR V review Awesome images improved video unbeatable autofocusSony s full frame AR IV was one of the best mirrorless cameras I ve ever reviewed so there was a lot of pressure on its successor The company s answer is the megapixel AR V designed to deliver the maximum amount of detail for portrait and landscape photography Though it uses the same sensor as the AR IV the new model has been improved in nearly every other way The processors have been updated to the same ones found on the megapixel A allowing for faster autofocus and AI tracking and better video specs Sony has also improved the stabilization the rear display EVF and more all for the same price as its chief rival the Canon EOS R Sony s advanced technology has always been its superpower but rival models from Canon Panasonic and others have started to catch up To find out if the AR V is worth buying over other cameras and even the last model I took it out for some detailed testing Spoiler alert it s one impressive camera Body and handlingSony made some changes to the design of its full frame mirrorless cameras starting with the AS III and the AR V continues in that vein On top of a slightly bigger grip it has a number of improvements over the AR IV such as a new dedicated selector for video photos and the slow motion S amp Q mode By taking that function off the mode dial it s relatively easy to switch between photos and video then change modes in each It s also possible to share some all or none of the settings like shutter speed and ISO between photo and video modes using the customization menu Sony also moved the record button from the back to a better position on top As with other Sony cameras it s intuitive and easy to use Some people may find it uncomfortable to hold all day though particularly those with larger hands That s because the grip has some hard edges and a material that s less cushy than Canon s R for example A big new innovation on the AR V is the rear display Rather than a simple tilt only screen like before Sony has come up with a whole new system It not only flips out but also tilts not just upwards like Panasonic s similar system on the GH but also down and out as well On top of being better for vlogging and selfies it also lets you move the screen clear of any microphone or monitor cables It s also better for photo shooters Some people prefer a tilting display for shooting at high and low angles so the AR V has the best of both worlds The AR IV already had a very good million dot EVF but Sony made it even better Resolution on the OLED panel is up to million dots though it drops when you focus or increase the refresh rate to the maximum Hz Still it s now close to matching what you d see in an optical viewfinder Steve Dent EngadgetLike the A and AS III it has a pair of dual format card slots Each one accepts either UHS II SD or faster but far more expensive CFexpress Type A cards The latter are required for K video and let you shoot photo bursts longer before the buffer fills Since the AR V is now a much better video camera Sony has seen fit to swap out the tiny and fragile micro HDMI jack for a full sized one Though still not up to pro standards it offers a relatively secure connection and allows for more robust cables as micro HDMI models are prone to breaking It has the same battery as the A and delivers exactly the same number of maximum shots on a charge That s under lab conditions though and I got about double that in the real world The USB C Gen port is PD compatible so you can charge the battery and power the camera at the same time It also comes with microphone and headphone ports as you d expect plus a wired LAN port and the ability to do zoom calls or livestream over USB C via the UBC webcam standard PerformanceSteve Dent EngadgetThe AR V has roughly the same burst speeds as its predecessor fps in both mechanical and electronic modes shooting C RAW and JPEG photos That drops to fps when shooting uncompressed RAW files While not super quick compared to Sony s A or the Canon EOS R both have stacked sensors it s not bad at all for a megapixel camera You can shoot about C RAW JPEG files before the buffer fills though that takes less than two seconds Sony is known for its brilliant autofocus and the AR V may be its best camera in this area to date WIth phase detect focus points up from on the AR IV the regular non subject tracking AF is uncannily accurate in all five area modes delivering a large majority of sharp frames even with fast moving subjects Things get even better when you kick in the AI On top of the excellent face head and eye tracking Sony has introduced a new body tracking mode It works much like D motion tracking software used for animation predicting the position of your head and eyes based on your skeletal structure If it fails to track the subject s face it can also switch to their body and still grab sharp shots On top of humans it can also track people birds animals insects cars trains and airplanes However you have to select those manually it would be nice to have an auto mode that lets the AI choose the subject like Canon s EOS R II It also has a touch to track mode that locks onto subjects more accurately than rival models Steve Dent EngadgetIn most of these tracking modes the camera did a good job at focusing on the subject s eyes Failing that it accurately tracked the head or body and still delivered sharp photos The results were particularly impressive considering the high resolution that shows focus flaws in minute detail It sometimes failed to lock onto birds and other animals eyes though that s something Sony could potentially improve with firmware updates By and large though it nailed focus nearly every time beating rivals by a solid margin The AR V also has a new in body stabilization system boosting it from to stops with supported lenses the same as what Canon s EOS R offers It was very good for photography letting me take sharp shots down to a quarter of a second That means you can shoot handheld and capture the streak of a car s lights for instance while freezing the background That being said it falls a bit short for video as you ll see soon Image qualityAs it has the same megapixel sensor the AR V delivers near identical image quality to the AR IV That s not a bad thing as the latter can produce stellar images With the very high resolution and the lack of an anti aliasing filter only Hasselblad and Fuji s megapixel medium format cameras offer greater detail If that s not enough you can use Sony s Pixel Shift Multi Shot and quadruple it to megapixels With no low pass filter beware of antialiasing or moire that can crop up in detailed or repeating parts of an image The high resolution means that the detail has to be very fine however JPEGs are ready to share right out of the camera with nicely tuned levels of sharpening and noise reduction Colors are more accurate but perhaps less flattering to skin tones than Canon s latest models The system is particularly well tuned to sunny blue sky scenes so the AR V is a great option for landscape shooting Sony claims stops of dynamic range above Canon but perhaps slightly below Nikon That gives you tons of overhead to edit RAW files fix under or over exposed shots or tweak colors Except for highly detailed scenes I didn t notice much difference between compressed and uncompressed RAW files The AR V does surprisingly well in low light At speeds up to ISO grain isn t an issue Noise increases considerably at ISO but images retain detail Beyond that they can get gnarly with large grained color noise Still for such a high resolution camera it exceeded my expectations in this area As it happened I reviewed the AR V at the same time as the megapixel Hasselblad XD so it was a good opportunity to test two very high resolution cameras Both use sensors that have the same size pixels and both are likely manufactured by Sony For many photos it was honestly hard to tell the difference which is not bad for Sony considering the XD costs over twice as much VideoThe AR V is a pretty darn competent video camera if you understand its limitations It now offers K at up to fps K p and bit video with S Log S Cinetone and HDR formats The AR IV had none of those features so it s quite a step up Steve Dent EngadgetThere are some asterisks though The K video has a times crop while K p has a times crop with pixel binning K p video is uncropped but also uses pixel binning The only way to get supersampled video is with a times APS C crop That however is limited to fps fps video is only available at p That said Sony has done a good job with the pixel binning so it doesn t look significantly less sharp than the APS C video supersampled from K Now that it supports bit capture the S Log video is far more useful than on the AR IV You ll see less banding once you grade it and the stops of dynamic range give you extra room to push blacks pull back highlights and tweak colors As with photos hues are natural and accurate and the AR V is decent but not awesome for video in low light The AR V now has the best video autofocus system too It s nearly foolproof locking onto subjects quickly and accurately even in chaotic circumstances Shooting one scene with three people it stayed locked onto the main subject even after he moved positions around the frame All the AI features mentioned for photos work for video so it can track animals and other subjects nearly as well as humans Steve Dent EngadgetThe updated stabilization isn t nearly as good for video as for photos It s good for handheld video if you don t move around nicely smoothing out any hand shake or small motions However any rapid movements or walking will cause jolts that mar the video Panasonic s new S II is much better in this regard You might be thinking at this point that the AR V is actually a solid video option but it s held back by one thing excessive rolling shutter It s particularly bad at K and full frame K with any camera movement setting off a jello like effect The best case scenario is in APS C mode but you ll still need to be careful not to whip the camera around Still the AR V is fine for most video shooting If you re mainly looking to shoot video though I d get another camera For instance Canon s EOS Rc or the Nikon Z are better if you need K and can tack an extra thousand or two onto your budget If K is fine Canon s new EOS R II or the Panasonic S II are better and a lot cheaper Wrap upSteve Dent EngadgetSony is once again on top of the high resolution full frame camera market with AR V Image quality and detail are outstanding autofocus is second to none and the updated video capabilities are a great addition for hybrid shooters As mentioned Sony s main rival is the megapixel Canon EOS R which offers lower resolution and better video capabilities but suffers from overheating issues The megapixel Nikon Z is also a more capable video camera but costs more and Nikon s megapixel Z II is less but has inferior autofocus and video None of those models come close to matching the AR V s resolution image quality and exceptional AF though Given that plus the massive video improvements it s now the best high resolution full frame camera on the market by far |
2023-02-10 15:00:58 |
金融 |
金融庁ホームページ |
証券監督者国際機構(IOSCO)による「投資ファンド統計報告書」第2版の公表について掲載しました。 |
https://www.fsa.go.jp/inter/ios/20230210/20230210.html
|
iosco |
2023-02-10 16:00:00 |
ニュース |
BBC News - Home |
RMT union rejects latest offers in rail dispute |
https://www.bbc.co.uk/news/business-64600975?at_medium=RSS&at_campaign=KARANGA
|
network |
2023-02-10 15:51:12 |
ニュース |
BBC News - Home |
Nicola Bulley: It's like torture, says friend of missing mum |
https://www.bbc.co.uk/news/uk-england-lancashire-64589281?at_medium=RSS&at_campaign=KARANGA
|
friends |
2023-02-10 15:11:11 |
ニュース |
BBC News - Home |
String of cars stripped of parts in Birmingham city centre |
https://www.bbc.co.uk/news/uk-england-birmingham-64568353?at_medium=RSS&at_campaign=KARANGA
|
january |
2023-02-10 15:05:24 |
ニュース |
BBC News - Home |
Six Nations 2023: England pick Owen Farrell over Marcus Smith to face Italy |
https://www.bbc.co.uk/sport/rugby-union/64598385?at_medium=RSS&at_campaign=KARANGA
|
Six Nations England pick Owen Farrell over Marcus Smith to face ItalyEngland coach Steve Borthwick drops Marcus Smith and selects Owen Farrell at fly half against Italy in the Six Nations on Sunday |
2023-02-10 15:19:09 |
ニュース |
BBC News - Home |
Silverstone F1 track invaders guilty of causing public nuisance |
https://www.bbc.co.uk/news/uk-england-northamptonshire-64601297?at_medium=RSS&at_campaign=KARANGA
|
invaders |
2023-02-10 15:02:29 |
ビジネス |
不景気.com |
大幸薬品の22年12月期は48億円の赤字継続、措置命令で - 不景気com |
https://www.fukeiki.com/2023/02/taiko-yakuhin-2022-loss.html
|
大幸薬品 |
2023-02-10 15:07:59 |
コメント
コメントを投稿