mapstruct简化开发_简化投资组合网站的开发

news/2024/5/12 21:24:20/文章来源:https://blog.csdn.net/weixin_26746861/article/details/108176391

mapstruct简化开发

(This was originally published in my blog at https://vascoabelha.com/blog/simplify-dev-portfolio/)

(最初发布在我的博客中, 网址为https://vascoabelha.com/blog/simplify-dev-portfolio/ )

嘿大家! 👋 (Hey everyone! 👋)

This is my first post ever and I know that this is just another drop in the ocean of guides in “how to build your own webpage/portfolio”. Nevertheless, I hope that I can shed a different light and approach in the planning of your portfolio. This is also for me a first step in giving back to the dev community, the help and guidance I have received so far.

这是我的第一篇文章,我知道这只是“如何构建自己的网页/作品集”指南中的又一滴。 不过,我希望我可以在规划您的投资组合时有所不同。 对我来说,这也是回馈开发人员社区的第一步,到目前为止,我已经获得了帮助和指导。

语境 (Context)

Over the last month, I have built my personal website and tried to keep it simple but aesthetically pleasing.

在过去的一个月中,我建立了我的个人网站,并试图使其保持简单但美观。

During the development, I documented every decisions and steps I made in order to help me solidify some concepts. Since there are already many and good guides in how to build portfolios, I will abstain from delving in coding breakdown/guides and will focus on a more generic perspective. Besides I don’t think it would be valuable for the reader to be imposed with a design and code that he is not comfortable with. Our personal/portfolios websites should be a representation of ourselves, preferences and likes.

在开发过程中,我记录了我所做的每个决定和步骤,以帮助巩固一些概念。 由于已经有很多关于如何建立投资组合的良好指南,因此我将不再研究编码故障/指南,而将重点放在更通用的角度。 此外,我认为读者不熟悉自己的设计和代码对他们来说没有什么价值。 我们的个人/投资组合网站应代表自己,喜好和喜好。

In this post, I will describe what I used for building my webpage (JAMStack) and reasons for choosing this architecture. There will also be a short section regarding the design of your website and some tips to help you stand out!

在本文中,我将描述构建网页(JAMStack)所用的内容以及选择此体系结构的原因。 还将有一个简短的部分介绍您的网站设计,并提供一些技巧来帮助您脱颖而出!

So why JAMStack?

那么为什么要使用JAMStack?

My decision with going with JAMStack can be quickly summarized in wanting:

我对使用JAMStack的决定可以快速总结为:

A Fast, Cheaper, Secured and Simpler way of developing and maintaining a website.

开发和维护网站的快速,便宜,安全和简单的方法。

Image for post
Lighthouse Score
灯塔得分

JAMStack is a term used to describe a new architecture for building websites and applications where

JAMStack是一个术语,用于描述用于构建网站和应用程序的新架构,其中

JAM → J = JavaScript | A = API | M = Markup

JAM→J = JavaScript | A = API | M =标记

JavaScript (JavaScript)

JavaScript role is building dynamic content on your website, fetching data, etc. This does not mean that everything in a JAMStack is built with Javascript. In fact, you have different SSG (Static Site Generators) built on different languages. Eg: Hugo in Golang, Jekyll in Ruby, Pelican in Python, etc.

JavaScript角色是在您的网站上构建动态内容,获取数据等。这并不意味着JAMStack中的所有内容都是使用Javascript构建的。 实际上,您具有基于不同语言构建的不同SSG(静态站点生成器)。 例如:Golang中的Hugo,Ruby中的Jekyll,Python中的Pelican等。

For a list of available SSG you can go to:

有关可用的SSG的列表,您可以转到:

API (API)

Where usually we have Server-side functions to access/consume/query data, in JAMStack these API/services are accessed and consumed as you want. JAMStack is agnostic to API. We can easily use 3rd party services as well as building our own specific APIs.

通常我们在服务器端具有访问/使用/查询数据的功能,而在JAMStack中,可以根据需要访问和使用这些API /服务。 JAMStack与API无关。 我们可以轻松使用第三方服务以及构建我们自己的特定API。

标记 (Markup)

This is where the fun is! Everything that you see in your site is served through HTML Static Files created during the building phase. These files have already the structure and information needed to be presented when accessing the page.

这就是乐趣所在! 您在网站中看到的所有内容均通过在构建阶段创建HTML静态文件提供。 这些文件已经具有访问页面时需要呈现的结构和信息。

Unlike dynamic website based on templates, you don’t need to wait for the server to query the api/database to present and render the webpage, since the website and its respective pages were prebuilt at the time of the build. The frontend is decoupled from the backend and thus the website can “live on its own” — serverless.

与基于模板的动态网站不同,您无需等待服务器查询api /数据库来呈现和呈现网页,因为该网站及其各个页面是在构建时预先构建的。 前端与后端脱钩,因此网站可以“独立运行” —无服务器。

Image for post

In the end, we have:

最后,我们有:

• A more secure website since it does not need to interact with a backend;• Faster and more responsive website since everything is built on static html files, we don’t need to query or wait for anyone to render the page;•Scalable due to the CDN (Content Delivery Network) for the website and the strict separation/modularity, between frontend/website and backend;• Cheaper because you have companies that can even host your static files for free!

•更加安全的网站,因为它不需要与后端交互;•速度更快,响应速度更快的网站,因为所有内容都基于静态html文件构建,因此我们无需查询或等待任何人来呈现页面;•可伸缩到网站的CDN(内容交付网络),以及前端/网站和后端之间严格的分隔/模块化;•便宜,因为您拥有可以免费托管静态文件的公司!

With this in mind, and after checking the available static site generators, I ended up choosing the GatsbyJS due to:

考虑到这一点,在检查了可用的静态站点生成器之后,由于以下原因,我最终选择了GatsbyJS

• better SEO features;• documentation — this was a decisive factor. Gatsby.JS documentation is clear and more than sufficient to guide you in every step of the way, from preparing, developing, to building and deploying a website;• larger dev community, in which can be seen as: “I will most likely fail somewhere, but at least I have a higher chance of finding someone that had the same problem” 😂.

•更好的SEO功能;•文档-这是决定性因素。 Gatsby.JS文档非常清晰,足以指导您从准备,开发,构建和部署网站的各个步骤;•更大的开发者社区,在其中可以被视为:“我很可能会失败某个地方,但至少我更有机会找到遇到相同问题的人。”

Setting aside the technological decisions, we can now focus on a more subjective and personal based decision — the design.

撇开技术决策,我们现在可以专注于更主观和基于个人的决策-设计。

设计 (Design)

在模板之间进行选择或自行设计。 (Choosing between templates or designing yourself.)

Like many of you, I am not a designer or specialised in any kind of UI/UX. Everything that I know is from self-learning and probably not much 😬. However, we can’t be hostage of our own shortcomings, so what can we do to fill the gaps?

像你们中的许多人一样,我不是任何UI / UX的设计师或专家。 我所知道的一切都来自于自学,也许不多。 但是,我们不能束缚自己的缺点,那么我们该怎么做才能填补空白呢?

Well we can either use an already built template/theme available 😞 or we can do some research on what does a good design entails and view some examples as inspiration 🤩.

好吧,我们可以使用已经构建的模板/主题(😞),也可以对优秀设计的内容进行一些研究,并将一些示例视为灵感🤩。

Here is a list of some good websites/resources that I tend to use when I am in need of inspiration:

以下是一些我需要灵感时倾向于使用的优秀网站/资源的列表:

• https://dribbble.com/

• https://dribbble.com/

•https://webframe.xyz/

• https://webframe.xyz/

•https://land-book.com/

• https://land-book.com/

• https://www.behance.net/

• https://www.behance.net/

• https://www.designnotes.co/

• https://www.designnotes.co/

• https://edu.gcfglobal.org/en/beginning-graphic-design/ (I believe this is a good tutorial to help you grasp some of the basic concepts of graphic design)

• https://edu.gcfglobal.org/en/beginning-graphic-design/ (我相信这是一个很好的教程,可以帮助您掌握一些图形设计的基本概念)

Now if you ask me if I would use a theme/template or build one from scratch, I would undoubtedly choose the latter, due to the fact that I believe in the importance of showing ourselves, our uniqueness through what we design and build. Even though a prebuilt template would most likely save me time, I tend to see everything that I do as an opportunity to invest in myself and learn new things and comparing both options I probably wouldn’t learn a lot with using a template.

现在,如果您问我是要使用主题/模板还是从头开始构建主题/模板,则毫无疑问,我会选择后者,因为我相信通过设计和构建展现自己,独特性的重要性。 即使预先构建的模板最有可能节省我时间,但我还是倾向于将自己所做的一切视为投资自己和学习新事物以及比较这两种选择的机会,我可能不会从使用模板中学到很多东西。

在设计和开发过程中要考虑的事项。 (Things to take in consideration during the design and development.)

Before coding, I would advise you to create some Mockups of your website. This will not only force you to organise your ideas on what and how do you want to show, but also help delineate a plan, a series of steps needed to effectively assist and guide you during the coding sessions. For this you can use tools like Figma, Adobe XD, Sketch, etc.

在编码之前,我建议您创建网站的一些模型。 这不仅会迫使您根据要展示的内容和方式来组织想法,而且还有助于描述计划,这是在编码会议期间有效协助和指导您的一系列步骤。 为此,您可以使用Figma,Adobe XD,Sketch等工具。

Here are some tips to help you start designing your portfolio/personal websites:

以下是一些技巧,可帮助您开始设计自己的投资组合/个人网站:

  • Fonts play an important role. It sets the tone of your design. If you are stuck in choosing a pair of fonts with good contrast for your website, you could use a tool like [https://fonts.google.com/](https://fonts.google.com/) or [https://fontjoy.com/](https://fontjoy.com/) to help you decide.

    字体起着重要作用。 它设定了您的设计基调。 如果您在为网站选择对比度高的一对字体时遇到麻烦,可以使用[ https://fonts.google.com/](https://fonts.google.com/)或[ https ://fontjoy.com/](https://fontjoy.com/)来帮助您做出决定。

  • In terms of colours, you will probably be fine with 2–3 colours that work well together. If you are interested in learning more, you can search for colour theory. There are also websites that help you building pallets of colours like : [http://colormind.io/](http://colormind.io/)

    在颜色方面,使用2到3种可以很好地搭配使用的颜色可能会很好。 如果您有兴趣了解更多信息,可以搜索色彩理论。 也有一些网站可以帮助您构建各种颜色的托盘,例如:[ http://colormind.io/] ( http://colormind.io/)

  • On top of linking your social media, a Contact Form is also an important tool to build bridges between you and your visitors. Nowadays, depending on the stack that you are using, it is super simple to build and deploy a reasonable Contact Form — E.g. Netlify Forms and Formspree.

    除了链接您的社交媒体之外,联系表单也是在您和访问者之间架起桥梁的重要工具。 如今,根据所使用的堆栈,构建和部署合理的联系表(例如Netlify Forms和Formspree)非常简单。
  • In addition to publishing your work in the website, you should also have a hyperlink to a detailed CV. This may speed and ease the process of recruiters or agencies that are searching for candidates, and if they end up in your website, then you are probably a suitable candidate for what they are searching 🤔

    除了在网站上发布您的作品外,您还应该具有指向详细简历的超链接。 这可以加快并简化招聘人员或代理机构在寻找候选人的过程,如果他们最终出现在您的网站中,那么您可能是他们所搜索的对象的合适候选人🤔
  • This isn’t related to design, but if you have the possibility, you should buy a domain. Having a custom domain name will improve your credibility and professionalism in the eyes of the visitors.

    这与设计无关,但是如果有可能,您应该购买域名。 在访客看来,拥有自定义域名将提高您的信誉和专业水平。

结论 (Conclusion)

For this post, I have covered everything that I wanted:

对于这篇文章,我涵盖了我想要的一切:

  • JAMStack;

    JAMStack;
  • Decisions that made me choose a JAMStack Architecture and GatsbyJS;

    决定让我选择JAMStack体系结构和GatsbyJS;
  • Resources to help you start designing your website;

    帮助您开始设计网站的资源;
  • What approach to have when building your portfolio in order to stand out, save time and reduce indecisiveness → No Templates, Mockups First and Code later;

    建立投资组合以脱颖而出,节省时间并减少犹豫不决的方法是什么?→没有模板,首先没有模型,没有代码。
  • General tips to take in consideration while designing and building your portfolio.

    在设计和构建投资组合时要考虑的一般提示。

If you wanna chat or discussing anything feel free to reach me at https://twitter.com/VaapVa

如果您想聊天或讨论任何内容,请随时通过https://twitter.com/VaapVa与我联系。

Take care 👋 !

保重👋!

翻译自: https://medium.com/swlh/simplify-the-development-of-your-portfolio-website-c264b94adbbb

mapstruct简化开发

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.luyixian.cn/news_show_856341.aspx

如若内容造成侵权/违法违规/事实不符,请联系dt猫网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

5g 软件软件开发_在5天内建立一个软件开发人员投资组合网站

5g 软件软件开发 作品集网站是程序员必不可少的工具 (A portfolio website is an essential tool for a programmer) The site serves two purposes — first to highlight any projects a developer may have worked on in the past, second to show off the coding skill of …

网站部署

网站部署 网站部署 网站部署 网站部署的流程:https://blog.csdn.net/tangiwang/article/details/83241282 网站部署一级域名、二级域名、子域名:https://www.cnblogs.com/chq3272991/p/5895760.html 如何发布网站:https://jingyan.baidu.co…

重复绑定mouseover和mouseout事件

鼠标悬浮日期上显示日程数量 我需要实现鼠标悬浮在日期显示提示信息,提示信息用了layer插件,提示信息内容是新建的日程数量,效果图如下: 鼠标放在17号显示了当前日期新建了19条日程记录,这里需要在初始化日历的时候&am…

搭建WebGIS网站

转载自:https://www.cnblogs.com/mhere/p/8567805.html 搭建WebGis使用到的软件有:Java、Tomcat、GeoServer、PostgreSQL、PostGIS、OpenLayers3; 下面将一步步操作。 一、搭建服务器,使用软件:Java、Tomcat、GeoServer 1、安装并配置Java …

大型网站技术架构(1)

撸了今年阿里、头条和美团的面试,我有一个重要发现.......>>> 网站都是从小网站一步一步发展为大型网站的,而这之中的挑战主要来自于庞大的用户、安全环境恶劣、高并发的访问和海量的数据,任何简单的业务处理,一旦需要…

大型网站技术架构(2):架构要素和高性能架构

撸了今年阿里、头条和美团的面试,我有一个重要发现.......>>> 上一篇我们把整个架构演变过程大致说了一下,这次我们来说说从哪方面进行考虑设计 为了使网站的能够应对高并发访问,海量数据处理,高可靠运行等一系列问题&…

大型网站技术架构(3):WEB 前端性能优化

撸了今年阿里、头条和美团的面试,我有一个重要发现.......>>> 上次说到了性能优化策略,根据网站的分层架构,可以大致的分为 web 前端性能优化,应用服务器性能优化,存储服务器性能优化三大类 这次来说一下 w…

网站样式快速设计软件_如何(快速)设计样式指南

网站样式快速设计软件 Creating a styleguide is often a lengthy, decision-intensive exercise. Most large organizations will spend loads of time and money to make sure it fully encompasses their brand, company culture, and all of their design and marketing ne…

快速的UX批评:Kanye West的总统签名收集网站

Before we get started, I have to say that I am not at all commenting on Kanye’s politics or his right to run for office. Mostly because I don’t know what his politics are, but also because I want to keep this about 在我们开始之前,我不得不说&a…

在网站中内置WebRTC视频聊天

http://mozilla.com.cn/post/51923/ 在网站中内置WebRTC视频聊天 0 Felicia, 1116 我想大部分人应该都还记得“你好Chrome,火狐正在呼叫!”的博客和Demo,向大家展示了在火狐和Chrome中进行WebRTC视频聊天,获得了很多朋友的注意。从…

LAMP网站架构方案分析

LAMP网站架构方案分析 LAMP网站架构方案分析 LAMP(Linux-Apache-MySQL-PHP)网站架构是目前国际流行的Web框架,该框架包括:Linux操作系统,Apache网络服务器,MySQL数据库,Perl、PHP或者Python编程…

Android webview中定制js的alert,confirm和prompt对话框的方法 (处理webview 带网站地址的弹出框)

在Android的webview中定制js的alert,confirm和prompt对话框的方法 http://618119.com/archives/2010/12/20/199.html 1.首先继承android.webkit.WebChromeClient实现MyWebChromeClient。 2.在MyWebChromeClient.java中覆盖onJsAlert,onJsConfirm,onJsPrompt三个方法。 3.在初…

网站加速--动态应用篇 (上)

--提升性能的同时为你节约10倍以上成本 From: http://blog.sina.com.cn/iyangjian 一, 引子 二,总体结构图 三,系统结构综述 四,环境配置以及底层基础类库 五, Memcache & Mysql 常用场景案例 六,更多待续 ...... -----------…

网站加速--动态应用篇 (下)

--提升性能的同时为你节约10倍以上成本 From: http://blog.sina.com.cn/iyangjian五, Memcache & Mysql 常用场景案例 经典篇: 更新数据: 写全局MC,然后再写DB。 读数据: 先读MC,命中返回数据。不命中则读DB&#…

jsp网站引入外部css或者js失效原因分析

路径问题 css或者js导入失效最有可能的原因就是路径错误&#xff0c;这里我给出我的网站目录结构导入css代码&#xff1a;<link rel"stylesheet" type"text/css" href"css/login.css"> 记得jsp头部需要设置相对路径&#xff1a;<%Strin…

2017 年最受欢迎的 10 个编程挑战网站

译者注&#xff1a;如果你想不断地提高自己的编程技能&#xff0c;那么不断尝试去解决那些编程中的难题&#xff0c;这是一个非常不错的途径。作者在本篇文章中列举出了10个编程挑战网站&#xff0c;你想尝试一下吗&#xff1f;以下为译文。 如果你正在在学习编程&#xff0c;那…

什么是静态网站?什么是动态网站?

什么是静态网站&#xff1f;什么是动态网站&#xff1f;对于从没有接触过网站建设的朋友来说&#xff0c;这个问题还是没有真正的了解&#xff0c;许多朋友至今还认为动态网站就是网页中有flash动画&#xff0c;即会动的东西&#xff0c;才是动态网站&#xff0c;这样的理解是会…

什么是静态网站?什么是动态网站?

什么是静态网站&#xff1f;什么是动态网站&#xff1f;对于从没有接触过网站建设的朋友来说&#xff0c;这个问题还是没有真正的了解&#xff0c;许多朋友至今还认为动态网站就是网页中有flash动画&#xff0c;即会动的东西&#xff0c;才是动态网站&#xff0c;这样的理解是会…

wamp下Apache构建局域网下的个人电脑服务器(网站根目录更改)

第一步&#xff1a;在安装盘下找到wamp64文件夹&#xff08;我安装在D盘&#xff09;。 第二步&#xff1a;在wamp64文件夹下找到bin文件夹。 第三步&#xff1a;在bin文件夹下找到Apache文件夹。 第四步&#xff1a;在Apache文件夹下找到apache2.4.27文件夹&#xff08;不同的…

用phpcms如何将静态页面制作成企业网站(中)

上篇博客中讲到了该修改网页的中间部分 中间的内容是这样的&#xff0c;有标题和内容&#xff0c;里面的内容被代码替代,运行起来就这样的 里面的内容就可以在后台管理那里添加 再来看代码部分 <div class"dt-double" style"left: 18.5%;"><!--…