Hi, Thanks for this book! I know Python is recommended to use to build the browser in this book, but just want to know if it's feasible in Java as I am already learning it. Thanks!
Great question, Abhishek. In general we've written the book to not use too many Python-specific features, so I believe it should be possible to translate the code to Java. (I've successfully translated it to JavaScript.) The main worry is libraries. In Python, we use the sockets & ssl libraries for networking, the tkinter and tkinter.fonts libraries for 2D graphics, the dukpy library for executing JavaScript, the skia library for accelerated 2D graphics, and a couple of more minor libraries for accessibility-related stuff. In Java you'd probably need replacements.
I think you can probably get started and try to address each of these libraries as you come to it. Java has a sockets-like library and a TLS stack; the 2D graphics you can probably do using Swing or some other Java UI framework. And, while I don't know the Java ecosystem that well, there are likely solutions for executing JavaScript, accelerated 2D graphics, and so on too. Happy hacking!
Hi, Thanks for this book! I know Python is recommended to use to build the browser in this book, but just want to know if it's feasible in Java as I am already learning it. Thanks!
Great question, Abhishek. In general we've written the book to not use too many Python-specific features, so I believe it should be possible to translate the code to Java. (I've successfully translated it to JavaScript.) The main worry is libraries. In Python, we use the sockets & ssl libraries for networking, the tkinter and tkinter.fonts libraries for 2D graphics, the dukpy library for executing JavaScript, the skia library for accelerated 2D graphics, and a couple of more minor libraries for accessibility-related stuff. In Java you'd probably need replacements.
I think you can probably get started and try to address each of these libraries as you come to it. Java has a sockets-like library and a TLS stack; the 2D graphics you can probably do using Swing or some other Java UI framework. And, while I don't know the Java ecosystem that well, there are likely solutions for executing JavaScript, accelerated 2D graphics, and so on too. Happy hacking!
Sorry for the late reply. Thank you! I am attempting this in Java.