1
5

I've made a webpage for an event and on the ticket-selling platform they've also made a page. There's a lot of redundant information between the two. I'm finding it hard to decide if it's a good idea or not to deduplicate the information.

Personally, I would just have the information on the webpage and on the ticket-selling platform I would just sell tickets. The platform would have a link back to the webpage for people looking for more information.

It could be the opposite: the ticket platform could have all the info and just embed their iframe into a page on our website.

Anyway, the job is done for this time but I can't stop thinking about it :) Any thoughts?

2
-12
3
4
4
3

I wrote a post detailing why I use meaning as the criterion for selecting my next web development project.

5
2
submitted 2 months ago by Corsair@programming.dev to c/webdev@lemmy.world

cross-posted from: https://programming.dev/post/13268260

Hi,

I discovered this webpage
https://developer.mozilla.org/en-US/docs/Glossary/XMLHttpRequest

Where it say

The Fetch API is the modern replacement for XMLHttpRequest.

Without further explain on why so...

Did you (yourself) migrated from XHR to The Fetch API ? and is it better ? or do you know any (not bias) article about it ?

What about performances etc..

Thanks

6
4
submitted 3 months ago by starman@programming.dev to c/webdev@lemmy.world
7
8
submitted 4 months ago by trymeout@lemmy.world to c/webdev@lemmy.world

When using dependencies such as NPM packages, Composer packages. Weather you use a CDN or host the packages on the web server, don't many packages out there require you to display the licenses of the package being used and show attributions?

How would one place this on their website? I even went to several websites to see how they do this and could not find a section and I am sure these website use packages that require the license to be listed and list the attributions.

I can find the licenses and attributions of packages used in many applications on desktop and mobile, usually in the apps "about" page.

8
0
submitted 4 months ago by starman@programming.dev to c/webdev@lemmy.world

cross-posted from: https://programming.dev/post/11085588

We just tagged the first public v4.0.0-alpha so you can start experimenting with it and help us get to a stable release later this year.

9
15
submitted 4 months ago by edent@lemmy.world to c/webdev@lemmy.world

I've built a toy ActivityPub server. A single file of about 50KB.

10
3
submitted 4 months ago by ray@lemmy.ml to c/webdev@lemmy.world

cross-posted from: https://lemmy.ml/post/12252980

Magento, a company based in Berlin offering hosting and e-commerce platform, posted a video illustrating to their EU customers the significant impact of removing PWA support in iOS 17.4 on their services.

Source: https://twitter.com/mysk_co/status/1760585742655308077

11
4
submitted 4 months ago by starman@programming.dev to c/webdev@lemmy.world

cross-posted from: https://programming.dev/post/10271471

It weighs only 181 bytes. Nice.

12
3
How To Draw Radar Charts In Web (smashingmagazine.com)
13
26
14
3
submitted 5 months ago by silas@lemmy.eco.br to c/webdev@lemmy.world

Hello all!

I'm a beginner in web development. I'm building a simple small library application for learning purposes that has processes such as:

  1. The landing page is an main index page with links to people page, books page, etc.
  2. Suppose the user clicks "books", it will be redirected to a page with a list of all registered books, let's call it "books index".
  3. The user can edit one of the books or click the "new" link. Both choices will redirect they to "edit-book" page, with a simple form that can be submitted.
  4. After submission, the user is redirected to the "books index" to edit or add another book.

In summary:

[1: index] -> [2: books index] -> [3: edit book form] -> [4: books index]

In step 4, if the user clicks the "back button" in browser, it is redirected to the form page. If they edited 20 books, they will be redirected to the form page 20 times. It is rather confusing, so I want they to be redirected to the main index page if they are on the books index page.

It seems I cannot just remove things from browser history with Javascript.

Do you have any suggestion? I'm thinking about just adding a "back" button in the page which works differently from the browser button, but it would still add stuff in history, which could make things even more confusing.

Thank you very much.

15
7
16
4
submitted 7 months ago by extratone@lemmy.world to c/webdev@lemmy.world

does anybody have/know of any still-working apps/services for creating mocked-up images of single Tweets?

It occurs to me that I'm late in addressing this and panicking a little bit lol... Given the state of things, it definitively no longer makes sense to embed them imo... (publish.twitter.com stopped working a few weeks back, anyway, which was a real wakeup call lol.)

... but obviously, I still come across Twitter content I absolutely want to retain every day.

(if you're still not sure what I'm talking about - the exact same function as Re:Toot's exclusive purpose, but for Tweets instead of Mastodon posts.)

I've inadvertently spent more than an hour this morning going back through my favorite old methods and loosely classifying their current states. lmk if anyone desires more details on that.

17
14
submitted 8 months ago by matan_h@lemmy.world to c/webdev@lemmy.world
18
6
submitted 9 months ago* (last edited 9 months ago) by a_fancy_kiwi@lemmy.world to c/webdev@lemmy.world

To preface, I’m currently rewriting a personal webapp to use MySQL instead of storing everything in hundreds of JSON files. I’m currently in the testing phase of generating tables with the data from the JSON files, destroying the tables, adding more columns and data, repeat, all to make sure everything is working as intended.

My issue is that occasionally I’ll create too many columns and then I get an error saying something about the row being too large? I’ve also noticed that if I change the parameters of what data is allowed to go in the column, I can generate more columns. I know there is some relationship between number of columns, the data that can go in a column, data size, and row size but I don’t know what’s going on. I’d appreciate it if someone could broadly go over how row length(?) can affect number of columns.

Thank you

19
12

This looks like a great alternative to Postman/Insomnia and git integration would be really handy for teams.

20
5
submitted 9 months ago by robalees@lemmy.world to c/webdev@lemmy.world

First off, thank you to @tst123@lemmy.world for the initial help regarding the API in my original post

I’ve managed to use the Sheets API to pull in JSON of my spreadsheet. I am now struggling to pair the data to use in cards on my front end.

Here is my code

const API_KEY = "APIKEY";
const CLIENT_ID = "ID";
const HEADERS_ID = "tab1!A2:CE2";
const VALUES_ID = "tab1!A3:CE";
const URL = `https://sheets.googleapis.com/v4/spreadsheets/${CLIENT_ID}/values:batchGet?ranges=${HEADERS_ID}&ranges=${VALUES_ID}&key=${API_KEY}`;

async function getData() {
  const RESPONSE = await fetch(URL);

  const DATA = await RESPONSE.json();

  const COCKTAILHEADERS = DATA.valueRanges[0];
  const COCKTAILHEADERSOBJ = Object.assign({}, COCKTAILHEADERS.values[0]);
  const COCKTAILVALUES = DATA.valueRanges[1];
  const COCKTAILVALUESOBJ = Object.assign({}, COCKTAILVALUES.values);

  // console.log(DATA);
  // console.log(COCKTAILHEADERS.values[0]);
  console.log(COCKTAILHEADERSOBJ);
  // console.log(COCKTAILVALUES.values);
  console.log(COCKTAILVALUESOBJ);
}

getData(); 

My spreadsheet is set up like this…

  • ROW 1 = Headers for cocktail name in column A and ingredients in B through CE
  • All other ROWs = Column A is the cocktail name and B through CE is the measurement

When I log COCKTAILHEADERSOBJ I get an object with each ingredient name in an array and when I log COCKTAILVALUESOBJ I get an object with nested arrays, each array has the name and the measurement. If the drink does not contain the ingredient, I have an empty string.

Example of COCKTAILHEADERSOBJ
[0] = Cocktail Name
[1] = Lime
[2] = Tequila

Example of COCKTAILVALUESOBJ
[0]
   [0] = Margarita
   [1] = 1oz
   [2] =  2oz
[1]
   [0] = Old Fashioned
   [1] = 0oz
   [2] = 0oz

My goal is to have an object for each cocktail that looks like this

  "drinks": [
    {
      "cocktail name": "Margarita",
      "lime": 1,
      "tequila": 2
    }
]

If the value is zero, I don’t want the ingredient added to the new object for that drink.

Any suggestions on how I can loop through each item in COCKTAILVALUESOBJ and assign the correct COCKTAILHEADERSOBJ label to it so I can make a new object with each drinks recipe and then pull that new object into the DOM?

Feels like I should be able to use Array Map to get them into a single object, but I’m a little lost on how to do it with 2 objects.

Still incredibly new to JS and struggling with tutorials, hoping this project helps me learn and I appreciate any advice to help me search out the answer.

21
17
submitted 10 months ago by robalees@lemmy.world to c/webdev@lemmy.world

I’ve been learning frontend on and off for a few years and I keep trying to find a good project to help further my knowledge. My amazing wife created a Google Sheets database of cocktails we learnt to make over the pandemic. Columns are ingredients and rows are measurements in ounces.

I’d love to create and self-host a frontend for this data. Trying to use the Sheets app on our phones has driven us to drink (😉).

I have a server running OMV and Docker, I’d like to host a searchable webpage on my network (maybe one day host it externally) and utilize the data in this Sheets doc.

My Google-Fu is failing me, I don’t know what to search to make a start. Someone on Reddit suggested just using the Sheets doc and doing an API call to that file. I’m not opposed, I’m also happy to look into some sort of database software to broaden my skills (MongoDB etc).

Any suggestions or tutorial recommendations to help me create a searchable frontend using the data in my Sheets doc?

22
9
Clean up the web! (cleanuptheweb.org)
submitted 10 months ago by JRepin@lemmy.ml to c/webdev@lemmy.world

cross-posted from: https://lemmy.ml/post/4867982

Developers, it’s time for you to choose a side: will you help rid the web of privacy-invading tracking or be complicit in it?

23
3
submitted 10 months ago by TechyDad@lemmy.world to c/webdev@lemmy.world

Let's suppose that you didn't know either technology and were offered the chance to work with one or the other. Time for you to get up to speed on the technology was built into the project.

Which technology would you work with and why? Which would have more options in the future?

Yes, this is a real life situation I'm confronting. I'm deep in a Java training course but a .Net opportunity has come my way. Do I toss Java/Spring Boot aside for .Net? Or do I continue with Java/Spring Boot and decline the .Net opportunity?

24
5
submitted 11 months ago by FiniteLooper@lemm.ee to c/webdev@lemmy.world

I saw the creator of this course sharing it on LinkedIn and figured others might want to give it a shot! I've had very good experience with Udemy courses in the past, they are extremely comprehensive and well made.

25
2
submitted 11 months ago* (last edited 11 months ago) by Crul@lemmy.world to c/webdev@lemmy.world

cross-posted from: https://lemmy.world/post/2692134

SOLVED: by @g6d3np81@kbin.social using columns property

TL;DR: I want to achieve this behavior for the menu layout, but all I can get is this; note the different menu options order.

Two days ago I asked for help for implementing the current behavior without hardcoding the menu height for each resolution step, and there were two suggestions to try display: grid. It looked promising and after reading some documentation I was able to get something very close to what I'm looking for.

The only difference being that I want the chapters to be sorted vertically (as in the current version), but what I got sorts the chapters horizontally.

Here it is (what I think is) the relevant code:

#menu ul {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  grid-auto-flow: row dense;
}

Sorry, I don't have the display: grid version online.

I did a quick search for display grid multiple columns vertical sort and saw this StackOverflow post: CSS Grid vertical columns with infinite rows which, if I understand correctly, says it's not possible. But I'm pretty sure I'm not understanding it correctly.

Any help will be welcome, thanks!

EDIT: I also tried grid-audto-flow: column (as suggested here) but it just renders a single row. Probably because I'm missing something...

#menu ul {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  grid-auto-flow: column;
}

EDIT-2: I was told that for grid-audto-flow: column to work I need to specify the numbers of columns. If I understand correctly, then that doesn't really help. The original issue is that I need to edit the CSS file every time a new chapter is added. Which would be the same if I have to hardcode the number of rows.

I mean, it's a bit cleaner to hardcode the number of rows than the height in pixels, but I was looking for a solution that doesn't require magic numbers in the CSS.

view more: next ›

WebDev

1111 readers
1 users here now

Community for all things Web Development related.

founded 1 year ago
MODERATORS