投稿時間:2023-08-20 02:07:46 RSSフィード2023-08-20 02:00 分まとめ(12件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
AWS AWSタグが付けられた新着投稿 - Qiita 【2023年8月版】AWS EC2プランの一覧表(クラウドプラクティショナー試験対策用 備忘用) https://qiita.com/picoginnior/items/d136a9fcec59f573bf7b 課題 2023-08-20 01:24:06
Docker dockerタグが付けられた新着投稿 - Qiita Jetson Nano上のコンテナでpytorch使えるまでメモ(2023/08) https://qiita.com/3405691582/items/cdfae7a75bec272ceebf jetpack 2023-08-20 01:55:13
Docker dockerタグが付けられた新着投稿 - Qiita PostgreSQL 8.0 Docker Container https://qiita.com/ishitan/items/ce7db431d5a54482cf75 postgre 2023-08-20 01:22:58
Git Gitタグが付けられた新着投稿 - Qiita Windows の PowerShell(posh-git) で git を利用する https://qiita.com/kerobot/items/718d50ba8ebc2e199bc1 powershellposhgit 2023-08-20 01:37:09
海外TECH DEV Community “Rails of the unexpected” https://dev.to/paulxcodes/rails-of-the-unexpected-5hlp “Rails of the unexpected Hello and welcome back to my coding journey For those of you who just happen to stumble upon this post Hi My name is Paul and I am currently a student with Flatiron School on a journey to learn the basics of software engineering On my last blog post I opened the conversation with Ruby and it s gems For this blog topic I will go ahed to add to the subject and show you the magic of as you could guess by the title Rails Source What is Rails Rails or as you ll commonly find it in your searches Ruby on Rails is a popular open source web framework that provides the web developers with everything they need in order to build a functional application As a little history behind this programming language Ruby on Rails was created in by David Heinemeier Hansson The purpose of this creation was every developer s dream for their code to be DRY a k a Don t Repeat Yourself David noticed that as he was building applications with Ruby he was copying and pasting a lot of code blocks So by using Rails we don t have to worry about the small details a forgotten file or a typo in your folders we just focus on the harder parts Why do we need a framework I heard this analogy in school and I find it very compelling why do we use frameworks Imagine you re interested in a surround sound in your home What s the first step you would take Spend time researching how to build a speaker learn how to transfer the sounds through wires and create all the components in order to put together a surround sound I would think not You will probably save yourself the time and effort and will go with the option to purchase a system from an organization that already had done the previous steps and had put in the time and energy into researching and developing the system for others to enjoy The pillars of Ruby on RailsAs previously mentioned Ruby on Rails is a web framework Taken any application out there is unique in its own way there are certain parts that can be found in every application ex database links routes etc If you use a good web framework you have the resources to build new applications without having to write the base functionality over and over for each project Ruby on Rails is an open source library therefore you can always check the work that goes under the hood If we were to dissect this programming language we d come to realize that Ruby on Rails is in fact a Ruby gem as it uses Ruby code libraries Rails is using the MVC Model View Controller architecture pattern MVC has a specific set of conventions for building the logic for the application managing the code flow as presented in the image below SourceIf you are interested in how this design pattern works and the importance of MVC you can read more here The Rails philosophy an opinionated software What does that mean Rails gives us the benefit of skipping the decision making step of how to organize our folder structure how to name the files and in what order to position them Also Rails provides abstraction code that helps us speed up the coding process Applications built using Ruby on RailsGithubShopifyAirbnbSquare Twitch Zendesk Source Let s get to coding Now that we ve seen a brief description on what Ruby on Rails is and what websites are built using this language let s try to run some code of our own So let s begin by typing the magic words in the terminal gem install railsThis will install Rails globally on your computer and after this you ll be ready to use it from the terminal Now that the gem is installed you can start building Rails applications Naming conventionsWhen building a Rails application the name of the app should be written in lowercase letters that are separated by a the same way as it applies with Ruby for naming methods variable classes etc Best practice advise keep it nice and simple Creating a Rails applicationTo start the application you will type the following in the terminal rails new antique shop skip javascript️Disclaimer ️The skip javascript part just tells Rails that we won t be using JavaScript in our application After typing in the magic formula in a few moments everything you need in order to create your backend application will be installed Once the installation is completed you ll change into your Rails directory and open your text editor cd antique shopcode After your text editor will open you should be able to see the following structure There are a lot of folders and files in there But don t be scared Today you ll be working with the app and the config folders To be able to open the Rails server you ll need to type the command rails s and your terminal should display the following message Now you can verify if the server is working by navigating to your browser and entering http localhost ️Disclaimer ️Now if you re as lucky as I am you ll run into some errors with the msgpack Here s how to fix itOpen a new terminal make sure running arch outputs armComment all the lines of your Gemfile command ⌘ Run bundle clean forceRevert commenting the lines of your GemfileInstall your gems bundle installAfter this your rails s command should work just fine and show the message above SourceMoving forwardLet s check our antiques in our shop You can type in http localhost antiques in our browser and uh oh An error Oh no No worries tho You can fix it The program is nice enough to let you know you ve missed some steps and instead of giving back nothing it suggests what steps you can take to solve the issue In order to fix this you need to define a route in your Rails app Add the following in the config routes rb file Now you re going to go in the app controllers rb folder and create an antiques controller rb file with the following code This tells our app that when there is a GET request in the antiques path it should run the index method in the AntiquesController leading to this response in your browser Yay You ve just completed a full request response cycle in Rails P S To turn off the server simply press the Control C combo Shortcuts in RailsThere are a lot of gems shortcuts and macros that you could use in Rails Like remember when I said there are some shortcuts that can help you speed things up Well let me show you what I meant Above you had to go and manually create a new file in the controllers folder Boo Why go through all that when you could simply just type the following in your terminal rails g controller Antiques no test framework and get this ️Disclaimer ️The no test framework part just tells Rails to not add any spec files for testing and g is a shortcut for generate I know right And this is just the tip of the iceberg Final thoughtsAs always I am happy to take you along the way on my coding journey and I sure hope this subject has sparked some interest in your backend programming quest as it did for me Until next time happy coding 2023-08-19 16:45:26
海外TECH DEV Community What makes a great API? https://dev.to/nickytonline/what-makes-a-great-api-1n8e What makes a great API What are things you look for in a great API I d love to hear your thoughts on various aspects like a spec e g OpenAPI where you think is a great place to host your API resilience handling errors observability testing etc If you have examples of great APIs even better And if you have recommendations for tools to help with your awesome API share those as well 2023-08-19 16:08:44
海外TECH DEV Community A Comprehensive Guide to Creating a Scalable Folder Structure for Flutter Apps https://dev.to/yatendra2001/a-comprehensive-guide-to-creating-a-scalable-folder-structure-for-flutter-apps-1o5i A Comprehensive Guide to Creating a Scalable Folder Structure for Flutter AppsYo wassup flutter devs Flutter the UI toolkit from Google has been gaining immense popularity among developers for its flexibility and efficiency One of the challenges that developers often face when working with Flutter is organizing their project in a scalable and maintainable manner The folder structure plays a pivotal role in this Let s dive deep into how you can structure your Flutter app for scalability The Importance of Folder StructureSelecting the right folder structure for your Flutter application is an essential step It directly impacts the maintainability scalability and ease of collaboration when working with a team Given that Flutter does not impose a strict folder structure developers have the freedom to choose one that best fits their needs However this freedom can also lead to confusion especially for large projects Common Patterns in Flutter Folder StructureThere are two prevalent patterns in the Flutter community Folders By Type Domain This is the most common pattern Here files are organized based on their functionality or type For instance all screens would be placed in a folder named screens data models in models and so on This structure is intuitive and beginner friendly However it may become cumbersome for larger projects with numerous files lib ├ーscreens ├ーwidgets ├ーservices ├ーview models ├ーservices └ー Folders By Feature Ideal for larger projects this pattern organizes files based on features Each feature has its folder containing screens widgets controllers and services related to that feature This approach ensures better organization and easier navigation lib ├ーfeature │├ーscreens │├ーwidgets │├ーmodels │├ーservices │└ーview models ├ーfeature │├ーscreens │├ーwidgets │├ーmodels │├ーservices │└ーview models └ー A Deeper Dive into the Folder by Feature PatternFor those looking to adopt the Folder by Feature pattern there s a CLI tool that can help set up the structure The tool generates a structure as follows feature ├ーdomain │├ーmodels ││└ーfeature model dart│├ーrepository ││└ーfeature repository dart│├ーservices ││└ーfeature service dart│└ーfeature domain dart├ーproviders │├ーfeature provider dart│└ーproviders dart├ーscreens │├ーfeature screen dart│└ーscreens dart├ーwidgets │├ーfeature widget dart│└ーwidgets dart└ーindex dartYou can check out the CLI tool here Bonus Tip Code Organization and ModularityAnother effective approach to code organization is extracting common code pieces into packages This can be achieved in various ways Publishing a package to pub devUploading to a remote git repositoryHaving them in the same codebase as separate folderslib └ーpackages ├ーpkg │├ーlib │└ーpubspec yamlEach package will have its pubspec yaml file containing dependencies specific to that package ConclusionThe choice of folder structure largely depends on the scale and complexity of your Flutter project For larger projects having an opinionated pattern is beneficial as it ensures consistency even if it introduces some boilerplate code The key is to find a balance that suits your project s needs and enhances your development experience Thank you for reading If you found this guide helpful please share it with fellow Flutter enthusiasts This blog post is inspired by Ryan Dsilva s article on Medium so thanks to him Before We Go Hey thanks for sticking around If this post was your jam imagine what s coming up next I m launching a YouTube channel and trust me you don t want to miss out Give it a look and maybe even hit that subscribe button Videos will start dropping soon About me I am a coder with a keen interest in fixing real world problems through shipping tech products I love to read books I have read multiple books on start ups and productivity Some of my favourite reads are Zero to One Steve Jobs The Almanack of Ravikant and Hooked Nothing excites me more than exchanging opinions through productive conversations youtube com Until we meet again code on and stay curious Got any doubt or wanna chat React out to me on twitter or linkedin 2023-08-19 16:05:55
海外TECH CodeProject Latest Articles Float Point Numbers as Approximates & Using Errors https://www.codeproject.com/Articles/1163951/Float-Point-Numbers-Errors double 2023-08-19 16:22:00
ニュース BBC News - Home Lucy Letby: Families of victims call for greater powers in inquiry https://www.bbc.co.uk/news/uk-66553245?at_medium=RSS&at_campaign=KARANGA inquiry 2023-08-19 16:39:17
ニュース BBC News - Home William 'sorry' for missing Lionesses World Cup final https://www.bbc.co.uk/news/uk-66559702?at_medium=RSS&at_campaign=KARANGA charlotte 2023-08-19 16:37:54
ニュース BBC News - Home Sara Sharif murder inquiry: Searches continue for father of 10-year-old https://www.bbc.co.uk/news/uk-england-surrey-66554083?at_medium=RSS&at_campaign=KARANGA urfan 2023-08-19 16:32:59
ニュース BBC News - Home Liverpool 3-1 Bournemouth: Alexis Mac Allister sent off on Anfield debut https://www.bbc.co.uk/sport/football/66482704?at_medium=RSS&at_campaign=KARANGA Liverpool Bournemouth Alexis Mac Allister sent off on Anfield debutAlexis Mac Allister is sent off in his first home match for Liverpool but the Reds still overpower Bournemouth in a thrilling Premier League match at Anfield 2023-08-19 16:49:03

コメント

このブログの人気の投稿

投稿時間: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件)