Ranger or Barbarian?

New Player, trying to choose which class to pick.
Both the Barbarian and Ranger have acces to a good amount of melee weaponry, and can use Rougue abilities, being stealthy one of them.
However, I’m worried that the Barbarian could have pretty low defense because of the armor types available to him and being unable to use a shield.
The Ranger on the other hand, has access to Medium armor and blocking, but I think it’s obvious that the main point of the class are ranged attacks.

My questions are: Is it possible to do a full melee variant of the Ranger? Which one has the better chances at staying alive, the Barbarian or the Ranger?

Thanks for your attention if you’ve managed to read all this until the end.

Are you asking for PvE or PvP?

PvE most likely. It’s my first time playing the game, too early to start dying against other players.

Rangers are melee anyway with a bow because you have to keep master trapper buff to get reasonable dps out of it (and even then the dps is bad for a dps class). Full melee dps ranger using a sword does exactly one combo and does the least dps in the game. And on the top of that it’s the least engaging class to play , there’s not much fun to be had (unless you are want to gank people in pvp I guess)

My suggestion, play a barb it’s actually fun to play.

Also, pay no attention to rangers wearing medium armor, barbs are way more ‘tanky’ than rangers.

Thanks, will have to create another character then.

Barb have more armor then ranger because it is strength based class and he receive a lot of armor from this stat. This class have one of the best survivability in the game. My barb have more then 40% of physical mitigation with x2 RF prot rings and approx 46% of protection + around 13k hp. An additional barb have huge healing and regeneration from Blood Rage stance + Blood Fury on 15th stacks and Swarm Fighter ability, also he can feat Unstoppable ability give him 30% damage deflection when he heve less then 35% of health.

For example It is possible to tanking world boss in special build if u switch aggro with any second DD sometimes. Like I tanked Sand Demon 60-70% of the time on Fury coz no tanks online on this dead server on that moment.

To be honest, most of the time your mitigation as a DPS class is irrelevant anyways because you are not supposed to tank bosses. Sure, for some fights you need some roughly 1000 HP or 10% protection more than usual to survive a nuke from certain bosses (archer mini boss in T4 for example) but other than that you should only go for DPS anyways.
No one needs a barb that got HP like a tank but the DPS of a guard. Your best way of surviving is hate decrease and the tools to fend off aggro if you got it.

For solo play it makes almost no difference if you got 20% mitigation or 25% mitigation, I rather kill the enemy faster than tanking it for too long.

Barbarians and Rangers got their own ways of suriviability, rangers got the range advantage of a bow and their traps to keep enemies at distance and barbs got many stuns and kicks, also some of them are AoE as well as the Blood Rage stance that makes you tankier by buffing your health (and regeneration) for each stack.

Aside from the survival aspect, I personally would go for a Barbarian. I got both classes on level 80 and the barb is just so much more fun, especially because you are not limited to one spec all the time like rangers are. Rangers got “revamped” and dumbed down so much that all specs look almost the same since all end feats besides the Linebreaker are a waste of points to get there and really underwhelming. Melee ranger (with Sword + Shield or Dagger) is probably the most boring way to play any class, as Evito already said, you got one combo attack from level 60 that is the only useful combo unless you buy / get the combo book from khitai on level 80.

As a Barb you can go for dual wielding or two handed and both in a DPS or more survival way, there are far more options to play this class than a ranger has.