this post was submitted on 12 Aug 2023
128 points (88.6% liked)

Programming

17326 readers
246 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS
 

What if your dev experience was entirely in the cloud?

These days, launching applications means navigating an endless sea of complexity. We felt this pain at Google, so we started Project IDX, an experimental new initiative aimed at bringing your entire full-stack, multiplatform app development workflow to the cloud.

Project IDX gets you into your dev workflow in no time, backed by the security and scalability of Google Cloud.

Project IDX lets you preview your full-stack, multiplatform apps as your users would see them, with upcoming support for built-in multi-browser web previews, Android emulators, and iOS simulators.

As a Vim fanatic, I can't say I'll ever feel comfortable working in a browser, but some parts of IDX seem interesting. I wonder what the implications are for proprietary code.

I do think it solves an interesting problem where you're working on your desktop and decide to move to your laptop and continue working on the same codebase, but don't want to commit early so you can pull down the changes to your laptop.

It reminds me vaguely of Shells.

you are viewing a single comment's thread
view the rest of the comments
[–] realharo@lemm.ee 14 points 1 year ago* (last edited 1 year ago) (1 children)

VS Code also supports the devcontainter format, where you can get a well-defined fully configured dev environments locally or remotely. It also automatically asks whether you want to use them if the project has a devcontainer.json file.

So you can get the benefit of a standardized environment without going all-in on cloud.

https://containers.dev/

https://code.visualstudio.com/docs/devcontainers/containers

[–] Spectacle8011@lemmy.comfysnug.space 2 points 1 year ago (1 children)

This is quite interesting. Is the devcontainer spec tightly coupled to VS Code, or is it something that other IDEs do/can support?

Well, to be honest, I have a Docker Compose setup I use with Neovim anyway so I don't know what the benefits are of devcontainer compared to that.

[–] realharo@lemm.ee 6 points 1 year ago* (last edited 1 year ago) (1 children)

I think it was created by the same people as VS Code, and definitely designed around its needs (at least initially), kind of like the Language Server Protocol.

There is some preliminary support in IntelliJ - https://blog.jetbrains.com/idea/2023/06/intellij-idea-2023-2-eap-6/#SupportforDevContainers, but then it wasn't mentioned in the normal 2023.2 release notes, not sure if they pushed it to a future release or what. Either way, it's a work in progress there.

Then there are tools like https://devpod.sh/ that also use devcontainters.

Regarding how it's different from just using compose directly, I think the idea is that you "connect" your IDE to it and it specifies things like extensions (obviously IDE-specific), debuggers and debug configurations, language servers setup, environment to use when you open a terminal into it, etc.

[–] Spectacle8011@lemmy.comfysnug.space 2 points 1 year ago (2 children)

Judging by the big © Microsoft 2022 logo in the bottom right, I'd say you're right.

I guess this is one of those things I'm not going to appreciate until I need it, but none of that sounds more appealing to me over Docker Compose. I'm not sure how debuggers, etc,. would even apply to the server or why you would need to use a cloud server rather than running the services locally for a development environment. My guess is this would be a lot more useful for Windows users who don't have as easy access to the right dependencies?

[–] realharo@lemm.ee 3 points 1 year ago

The main pitch is that you don't have to spend time and effort with installing and configuring a project for development when onboarding new people to it, or when you want to contribute to someone else's project etc.

You get a proven, up-to-date "works on my machine" kind of environment that others also use, and you don't need to "pollute" your host system by installing additional tools necessary for each individual project. Compilation (and other build steps), running the project, running the tests, debugging, IDE configuration (e.g. language servers, linter plugins), etc. all happen inside the container.

I personally don't find it all that useful for projects I'm working on long-term myself, but it's nice if you need to check something in someone else's project which you're not that familiar with.

[–] atheken@programming.dev 2 points 1 year ago

I use dev containers on Mac, it’s not just about launching services that you need to test your code, it’s about specifying the entire build toolchain to get a deterministic dev environment in an isolated way.

You don’t need to manage the docker containers at all, vscode handles their lifecycle.

You can specify different extensions/configurations per project, so if you bounce between several languages, you’re only using the extensions/configs for a given project.

It also allows for a mostly seamless debugger experience with the browser when you launch a process.

The nice thing is that it sits off to the side, you can use your docker-compose as you normally would, but if you want to provide a full working dev environment for contributors, basically all they need is docker and vscode installed and they can get started.

The devcontainer spec is based on open standards, so it probably will end up in other editors, because it solves a huge problem for teams. The only thing that I think will come close is Nix, but I think it’s limited in scope in some important ways for this use case.